GoConqr has a new look! Let us know what you think.

Notes

Untitled

Sanket Ruikar English 1 page

Content of the notes (1)

Page 1

Why is Java platform independent? Why not C & C++?

When you run a C native code, it will be executed immediately. Whereas in the case of Java, when you run the byte code, the byte code will first be converted into native code and then be will executed.

When we say that java is platform independent, it means that the byte code is independent of any platforms.

When you create a .exe, it captures a machine code, where as when we create a byte code it does not capture machine code.

Java programming language was developed by the Sun Microsystems and was launched in 1995. The language has had many versions, the latest being Java SE 8, and still finds relevance in the industry.

Process of Java Program Execution

Human readable code with java syntax (.java file) ⇒ (javac compiler) ⇒ Byte Code (.class file) ⇒ (java interpreter) ⇒ native code

The components involved in writing program up to getting the output are:

java.exe set up file

Javac compiler, which checks syntax

Java interpreter, which understands only byte code and converts it to native code

Human readable code with proper java syntax, i.e. the Java File

Byte code - after the compiler compiles the Java File, i.e. Class file

Native code - We see output same in background is native code out of all these, only the byte code is platform independent

Information

Description
Note on Untitled, created by Sanket Ruikar on 26/06/2020.
Created by
Sanket Ruikar
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?