-
Why Java is Platform independent
Why Java is platform independent? How it is independent from different platform ? if you take C program, it also runs same as on different machine ?
Question asked by visitor prakashreddy
-
Contributing Member
Re: Why Java is Platform independent
The Java code that you compile gets converted to a form known a bytecode that is present in the .class files.
Every OS has its own JVM. The JVM takes this bytecode and then executes the program. So the hardware dependency is taken care of by the JVM.
Hence Java is platform independant.
A C program will have to be recompiled for it to run on different OS's. Thus it is platform dependant
Regards,
Sahil.
--Smile, it makes people wonder what you are thinking!!! 
-
Junior Member
Re: Why Java is Platform independent
The Java code that you compile gets converted to a form known a bytecode that is present in the .class files.Every OS has its own JVM. The JVM takes this bytecode and then executes the program. So the hardware dependency is taken care of by the JVM.
Hence Java is platform independant.
-
Junior Member
Re: Why Java is Platform independent
java is platform independent because it converts the given source code into byte code.every operating system has its own byte code so the java is platform independent
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules