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?

Answers were Sorted based on User's Feedback



After compilation of java program we'll get .class code. If it's generated in OS Windows ..

Answer / 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

After compilation of java program we'll get .class code. If it's generated in OS Windows ..

Answer / seshadri pera

Ranjmella is obsolutely correct for this Question. JVM is
platform dependent but any JVM specific to that OS will run
the compiled .class file on any OS.

.class files are in bytecode it can be run on any platform
which has it's specific JVM installed in that.

Is This Answer Correct ?    2 Yes 0 No

After compilation of java program we'll get .class code. If it's generated in OS Windows ..

Answer / chandu

It will work, becouse java is platform independent.

Is This Answer Correct ?    3 Yes 2 No

After compilation of java program we'll get .class code. If it's generated in OS Windows ..

Answer / stranger_ajnabi53@yahoo.c

ya it will work.bcoz java is platform independent.

Is This Answer Correct ?    1 Yes 0 No

After compilation of java program we'll get .class code. If it's generated in OS Windows ..

Answer / anjan singh

Whenever you compile a java code, a bytecode is generated
(i.e. class file). This bytecode can be interpreted by JVM.
So any machine with any platform(i.e.OS) that has JVM on it
can interprete this bytecode or class file.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is d difference between deep cloning and shallow cloning in core java?

3 Answers   Satyam,


How can constructor chaining be done by using the super keyword?

0 Answers  


What Is Pointer?

4 Answers  


What is 3-tier model?

3 Answers   Wipro,


what do you mean by marker interface in java?

0 Answers  






What is the size of arraylist in java?

0 Answers  


What is the difference between Trusted and Untrusted Applet ?

2 Answers   IBM,


Can we able to pass objects as an arguments in java?

0 Answers  


What is the static method?

0 Answers  


why ,we are using jsp and html.which one is better?

2 Answers   Photon,


What is operator overloading. Is it is supported in java?

0 Answers  


What are heap memory and stack memory and what are memory tables.

0 Answers   Aspiring Minds,


Categories