Why Java is a platform independent language?
Answer Posted / shital mhetre
Platform independent is nothing but write-once
Run-Anywhere.It means program can run on any Operating
System(OS).
compiler Interpreter
Java source code------->M/C code------->Linux or windows
javac JVM
Fig.
When you compile a source code by using javac compiler you
will get .class file which contains byte code.
that byte code can understand by JVM(Java Virtual Machine).
so, the JVM is different for different OS(operating system).
after that the JVM will convert the byte code(by using
interpreter) into machine understandable code i.e 1's & 0's.
Java is compiler as well as Interpreter Programming Language.
| Is This Answer Correct ? | 12 Yes | 6 No |
Post New Answer View All Answers
Can we inherit a class with private constructor?
Explain the significance of listiterator.
What are the differences between path and classpath variables?
What is double in java?
What is http client in java?
Why bytecode is called bytecode?
Can we have static methods in an interface?
Is 0 a real number?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
Can a constructor call another constructor?
What are 3 boolean operators?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
what methods would you overwrite in java.lang.object class?
What is a wrapper method?
What lambda means?