Skip to main content

Command Palette

Search for a command to run...

Why Java is platform independent language?

Published
1 min read
Why Java is platform independent language?

Java as of 2022 is the second most popular language in the world.

With increasing popularity, java has its particular feature, It is platform-independent.

A java program run on two steps.

1. It first should be compiled using 'Javac' compiler. When the code is compiled it is converted into an intermediate-level language called bytecode which is a part of the Java platform irrespective of the machine on which the programs run. It is stored in a .class file.

  1. In the second process .class file gets interpreted using an interpreter called Java Virtual Machine(JVM). JVM

Since , JVM is available in every machine we install .This is how a 'Java' provides reusablity of the code.