What is JAVA? Why it is platform independent?

Answer Posted / makin guru ji...

When Java Code is compiled a byte code is generated which
is independent of the system. This byte code is fed to the
JVM (Java Virtual Machine) which is resided in the system.
Since every system has its own JVM, it doesn't matter where
you compile the source code. The byte code generated by the
compiler can be interpreted by any JVM of any machine.
Hence it is called Platform independent Language.

Java is fully object oriented programming language.In java,
source code is compiled to give bytecode(class file).
that class file is able to run in any OS.it is simply
called as "COMPILED ONCE RUN ANYWHERE".class file is fed
into JVM, it will convert the class file into corresponding
machine code.

"what is platform
in dependent?" every os and every machine has its own code
which is known as "MACHINE CODE". I think you know about
asamblly language that is MACHINE CODE. so when we execute
java file it's class file(byte code) convert into this
machine code & then give output.jvm is a program which
needed to convert byte code file into machine code. & every
programing language need it's own compile and runtime
environment. so we always install aproprite tool for each
language.

platform independance means if u compile any progaram one
machine which run on particular os & then u take this
compiled progaram to any other machine which have not same
os still it runs and gives output.

thus we need every language's compiler to run the program.
even if you want to make resume you have to install atlist
ms word.

Java is one of the Object Oriented Language.
Mainly to run on Different Platform and Supporting in
Multi-Threading concept.
Because its only need and run Bytecode on Your platform.
Automatically reclaim Garbage Collection.
Its mainly Memory management.

java is platform independent because when after compile the
java source code it generate the byte code for jvm. it is
execute the byte code instruction for the particular
operating system. this byte code instruction execute the any
operating system it produce the same result thats why java
is platform independent

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a "pure virtual" member function?

851


Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.

711


What is bool mean?

750


Define an enumeration?

805


What interface is extended by awt event listeners?

813


What is the point of polymorphism java?

750


Java is pass by value or pass by reference? Explain

765


What is re-factoring in software?

796


What is the significance of java packages?

849


What is the size of int?

843


How to display arraylist values in java?

719


What is a treeset class?

757


What is keyset in java?

835


What is constructor and its types?

786


What is difference between throw and throws ?

860