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

Can a class have a static inner class?

835


What are the advantages of arraylist over arrays?

821


Where is const variable stored?

713


Give us a program to check for parenthesis matching using stack.

773


why would you use a synchronized block vs. Synchronized method? : Java thread

758


Is java same as core java?

835


What is package protected in java?

747


In Java list the methods that can be overridden?

794


Where is java located?

755


What is type parameter in java?

723


when to use ArrayList and when to use HashMap in webApplication.

4255


Explain the access modifiers for a class, method and variables?

911


How do you use compareto method?

768


Is empty .java file name a valid source file name?

822


How to create a custom exception?

766