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

Is java a utf 8 string?

530


Where are the card layouts used?

614


What is the difference between multitasking and multithreading in Java

722


What is purpose of find feature?

613


What is default switch case? Give example.

576






What is stringwriter?

539


How can you handle java exceptions?

529


What is a stack class in java ?

612


What is meant by data hiding in java?

636


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

587


Can two objects have same hashcode?

566


What does %d do in java?

578


What is the list interface in java programming?

582


What is an abstract method in java programming?

607


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

596