why and how Java is platform independent? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why and how Java is platform independent?

as it's clear that since Java is platform independent, it is portable etc...But how come it's code runs on every manufactured micro processor independently without Java compiler?

14th Aug 2016, 6:30 AM
Gowtham krvz kv
Gowtham krvz kv - avatar
2 Answers
+ 2
Java on its own is not very effective. It uses native code like c or c++. This native code is switched in the diffrent versions like Windows Linux and Mac. Socket can exist on diffrent OSs.
14th Aug 2016, 7:08 AM
Eric Zeus
Eric Zeus - avatar
+ 2
it need the jre (java runtime environment) which includes jvm (java virtual machine) to run the code which mean java need a virtual machine to run in every platform.
14th Aug 2016, 2:18 PM
One_Majed