Why does java have an interpreter? and not a compiler?

Posted by Galaxin on Stack Overflow See other posts from Stack Overflow or by Galaxin
Published on 2012-03-20T17:20:41Z Indexed on 2012/03/20 17:29 UTC
Read the original article Hit count: 224

Filed under:
|

Iam a newbie to java and was wondering why java have a interpreter and not a compiler? While shifting from c++ to java we come across the differences between these two

Compilation process being one of them.

1.A major difference between a compiler and interpreter is that compiler compiles the whole code at once and displays all the errors at a time whereas an interpreter interprets line by line.

2.Also a compiler takes a less time to compile a code when compared to an interpreter.

When java was developed for more advanced and easy features and implementations why has it been restricted to a interpreter based on above facts?

Is there any special reason why this is so? If yes what is it?

© Stack Overflow or respective owner

Related posts about java

Related posts about interpreter