It's both man.Compiler and Interpreter are not about any languages ,these are the tools which assist high level language to talk with OS. Yes, w.r.t java both comes into picture. Compiler converts source code(.java) into bytecode form(.class)which is OS independent.Then, interpreter interpretes byte code and converts it into machine level w.r.t.underlying OS. Prashant.
--------------<br />Prashant<br />SCJP-91%
Manas Ahlaad
Ranch Hand
Joined: Nov 07, 2001
Posts: 165
posted
0
you mean compiler gives byte code from source code and then interpreter executes it at runtime? in that case can we call it as a compiled language? since runtime it may be interpreted or compiler (hotspot does comilation at runtime also i.e all at one chunk).
Hi manas, Java is a compiler as well as an interpretor based language. What gives java its platform independance is the byte code which runs in the JVM. (remember it is the interpretor which executes the .class file in the JVM) So <filename>.java--compiled-->><filename>.class--interpreted in the JVM-->> Execution