Thursday, April 12, 2007

What is the difference between interpreted code and compiled code?

An interpreter produces a result from a program, while a compiler produces a program written in assembly language and in case of Java from bytecodes.The scripting languages like JavaScript,Python etc. require Interpreter to execute them.So a program written in scripting language will directly be executed with interpreter installed on that computer,if it is absent then this program will not execute.While in case of compiled code,an assembler or a virtual machine in case of Java is required to convert assembly level code or bytecodes into machine level instructions/commands.Generally, interpreted programs are slower than compiled programs, but are easier to debug and revise.


subodh agrawal on July 10, 2011 at 8:55 AM said...

In case of java, what is the role of interpretor and where does it reside? interpretor depends on JVM or OS?


Interview Questions On Java,Java EE Copyright © 2016. Reads: best tracker