Why does java have an interpreter? and not a compiler?
- by Galaxin
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?