After compilation of java program we'll get .class code. If
it's generated in OS Windows XP will it work on OS Linux? If
yes why? If no why?

Answer Posted / rajmallela

Java is platform independent. but JVM is not platform independent .it is platform dependent.Each O.S has its own JVM
That JVM can understand .class file irrespective of the O.S from which it(.class file) is coming . So widows generated .class file will work in Linux O.S.(b/z Linux JVM can understand .class file obviously)

Is This Answer Correct ?    22 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you read a char in java?

465


What is == and === in javascript?

563


Can arraylist hold different types java?

490


Explain purpose of sleep() method in java?

623


What are parameters in a method?

587






Why enumeration is faster than iterator?

531


Are constructors methods?

572


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

615


What do you understand by the term wrapper classes?

548


What is the statements?

595


Is set sorted in java?

523


What is the difference between compiler and jvm?

559


What is a type parameter in java?

535


What is final class?

579


Why string is immutable or final in java

631