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
What is the parse method in java?
What are different type of exceptions in java?
What does it mean that strings are immutable?
Can one thread block the other thread?
When do we use hashset over treeset?
Which is the best approach for creating thread ?
What is the full meaning of java?
Can a static class have a constructor java?
What is anonymous inner class?
State the difference between strings and arrays.
How many times finalize method will be invoked? Who invokes finalize() method in java?
What is difference between static and final?
Is minecraft 1.15 out?
Can there be an abstract method without an abstract class?
Can a class declared as private be accessed outside it’s package?