Home » Why Java has both Compiler and Intepreter?

Why Java has both Compiler and Intepreter?

The source code is directly converted to computer readable binary code by the compiler which will be executed by the OS to deliver output when it comes to C/C++. This compiler generated binary code on one OS cannot be executed on any other OS. That is, the computer generated binary code on a UNIX operating system can be executed only on Unix computer and similarly binary code generated on windows can be executed on Windows computers only. For this reason, c/c++ is considered as platform-dependent languages.

But when it comes to Java, the whole scenario is quite a different one and not the case as is with C or C++. It is a well known fact that Java is a platform independent language. In order to accomplish the platform independency, the developers have come up the new idea by introducing two new phases between source code to output. First is the compilation stage and second is an interpretation stage with the help of a new concept known as bytecode.

If you're interested to know about Java and want to learn Java to become developer, contact 7Pixelz - Best training Institute in Chennai for course details.

Name
Email Address
Mobile Number