What is Java?


 Java is a widely used easy-to-learn, general-purpose, very powerful high-level computer programming language that allows programmers to create desktop applications, web pages, mobile applications, and game consoles. Java uses both a compiler and an interpreter to convert Java statements to machine language. 

 

The java compiler converts Java statements to an intermediate code (byte code) and saves them in a file (.class file). The java interpreter then converts this intermediate code (byte code) to Machine Language (the one that can be easily understood by a computer). As we are not converting our Java code directly to the machine code, but to an intermediate code, which is then converted to machine code, hence Java code is compiled just once (we convert ava code to intermediate language only once), and this compiled code can now be run on any operating system, without being recompiled. That's why Java is platform-independent and it is “Write Once Run Anywhere (WORA)”.  The same can be shown in a flowchart diagram shown below.



No comments:

Post a Comment