Welcome back to Java Code Online. Understanding the functionality of the Java Compiler helps in understanding the processing at the back end of Java. A Java Compiler compiles the source code in Java and converts it into Bytecode which is used by the JVM in running the application.
In case of most of the programming languages like C, the compiler compiles the source code straight into executable code. This has the drawback of effecting the system configuration or programming viruses that can affect the functionality of the system.
Java has a two tier architecture that helps in avoiding the above mentioned issue. In Java, the source code is converted into Bytecode by Compiler, this Bytecode is only understood by the JVM. And then the JVM runs this bytecode. So anyhow nothing can go out of the shell of the JVM(Java Virtual Machine). The main advantage of this is security.
You can develop really secure applications in Java, without the fear that it may affect the system's functionality. Moreover any device like mobile or ipod or any other electronic gadget can use mostly use Java application without the fear of it being a virus. This and some other features of Java make it real strong and robust for any sort of conditions.
The functionality of the Java Compiler comprises of checking any violations of the syntax, and catching any exceptions that may occur during the execution of the program. Only run time exceptions are not checked during compilation of the Java Code by the Java Compiler. This is because Java wants to add an extra feature called "dynamic binding" which occurs at runtime, this concept comes under polymorphism, and I will discuss it again in the article for polymorphism. The comiler provided by Java is called "javac".
The "dynamic binding" provides the Java Code flexibility to bind Objects at runtime, that is the developer also does not know which Object will bind during the execution of the program. This is one of the most powerful concepts of Java.
I hope that this article help you understand the Java Compiler. In case you liked the article, do leave a comment. Remember to check my next article regarding Java on Java Code Online again.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.