Why Java is a platform independent language?

Answer Posted / ashwani maddeshiya

This is because of the magic of Byte Code which is OS indepedent. When java compiler compile any code then it generate the byte code not the machine native code(unlike C compiler).Now this byte code need a interpreter to execute on a machine.This interpreter is JVM.So JVM read that byte code(that is machine indepedent) amd execute it. Different JVM is designed for different OS and byte code is able to run on different OS.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible for a yielded thread to get chance for its execution again?

511


What are singleton services?

493


What is the use of 'super' keyword inside a constructor?

562


Is age a discrete variable?

528


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

486






Explain notify() method of object class ?

612


What are loops in java?

550


What are the 3 types of loops in java?

531


How many types of equations are there?

542


What is boolean logic?

559


What is meant by distributed application? Why are we using that in our application?

549


How does hashmap work in java ?

541


Give me an example of array and linked list? Where they can be used?

557


Lowest Common ancestor in a Binary Search Tree and Binary Tree.

558


What is difference between array and arraylist in java?

462