What is the difference between a compiler and an interpreter | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

What is the difference between a compiler and an interpreter

OOP concepts

1st Mar 2017, 1:14 PM
Jessy Matthew Thomas
Jessy Matthew Thomas - avatar
4 ответов
+ 2
A complier translates Java source code into Java byte code. The Java Virtual Machine, the interpreter, translates the byte code into native code so the computer can run your code. Steps - You write source code - The Complier translates the source code into byte code - The JVM translates the byte code into native code. Hope this helps!
1st Mar 2017, 1:30 PM
Heng
+ 1
An Interpreter execute the code line by line. that means if it executes a line and get error so it not execute rest of the code. Giving that error message. On the other hand compiler execute all code and give you is that successfully compiled or not. If not successful then it gives you the all error messages together.
1st Mar 2017, 1:51 PM
Faruque Hossain
Faruque Hossain  - avatar
0
Doesnt jvm change it to machine codes?.
1st Mar 2017, 1:32 PM
Jessy Matthew Thomas
Jessy Matthew Thomas - avatar
0
The JVM runs the program by translating it into native codes.
12th May 2017, 9:57 PM
Heng