Why java is platform independent?

Misthi Jha | Checked On: 07 April 2023


Rahul Patil

Is Java Platform-Independent?

Yes, Java programming language is a platform-independent programming language because the Java compiler converts the source code to bytecode, and the bytecode is an Intermediate language. Bytecode can be executed on any platform (Operating System) using JVM ( Java Virtual Machine) BUT for more understanding, we need to know about:

  • What is Platform?
  • How to execute a Java program? 
  • What is the difference between a byte and native code?


The platform is a combination of processor, operating system, and Hardware (specifically the CPO architecture).

Execute a Java Program

When we compile a Java program that program is directly converted into a machine-readable language which means (.exe) file. This (.exe) file is specific to the operating system.

Native Code

This (.exe) file is called the Native Code which is similar to the machine code.

Byte Code

Byte codes are nothing but intermediate codes generated after compilation and it is not executable code like Native code.

java platform independent
4 votes


Divya Shree

Platform Independent | Java Language

Java is platform-independent because the Java compiler converts the source code to bytecode, and the bytecode can be executed on any platform (OS) using JVM( Java Virtual Machine).

2 votes


Pankaj Patil

Java Language Platform Independent

Platform independence means that once compiled java program then you can execute the program on any platform (Operating System). 

0 votes


Vinod Bankar

Because of platform-independent Java is the most used programming language in the IT industry.

0 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)