+ 6
Isn't java platform independent? A question of sololearn challenge community.
Last day I was playing java challenge the question asked ' java is platform independent' true or false I went for true which was eventually wrong. So can u plz explain why.
5 Answers
+ 8
When Java compiler compiles the code, it generates the Byte code which is intermediate language and hence is platform independent. Now this Byte code needs an interpreter to execute on a machine and this interpreter is JVM which is platform dependent.
So, Gordon , shouldn't the answer to the challenge question be true and not false 'bcz 'Java' generates the bytecode and not the machine native code like C or any other does, and hence platform independent?
+ 7
Ayush Pandey as Gordon agreed and suggested that answers can be wrong, I recommend you to raise issue with that question.
+ 6
Java is platform independent but JVM is platform dependent
In Java, the main point here is that the JVM depends on the operating system ā so if you are running Mac OS X you will have a different JVM than if you are running Windows or some other operating system.
Reference :
https://www.google.com/amp/s/www.geeksforgeeks.org/java-platform-independent/amp/
+ 4
M. Watney yes I agree with you that the quiz answer should be true. Sometimes approved quiz has wrong answer.
+ 4
I have reported that quiz question if u find u do too