How java is platform independent?

Answers were Sorted based on User's Feedback



How java is platform independent?..

Answer / prankur tripathi

java is platform independent bcoz it can be run on any
platform.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 resides
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's bytecodes are desgined to be read and interpreted in
exactly same manner on any computer hardware or operating
system that supports Java Runtime Environment.

The Java Virtual Machine can be called a virtual operating
system that enables a java programme to run... we are thus
calling java platform independent because a java program
will not give different outputs on different machines but
platform dependent programmes tend to give different
results when compiled on different machines...

Is This Answer Correct ?    3 Yes 0 No

How java is platform independent?..

Answer / shobhit sachdeva

A language is platform independant if it satisfies the
following 3 conditions :

1. It is compiled in a platform neutral manner i.e. object
code obtained after compilation doesn't contain any
Operating System specific information and doesn't follow
O.S. specification formats.

2. Language provides its own runtime environment for
execution of its applications.

3. Language provides comprehensive library to act as an
interface for O.S. services i.e. applications developed in
the language doesn't directly reference any O.S. specific
functionality.

Java follows all these conditions.

Is This Answer Correct ?    24 Yes 22 No

How java is platform independent?..

Answer / chandra sekhar dash

Java compiler compiles the source code into bytecodes. These
bytecodes are platform independant i.e. in other words
specific to the Java Virtual Machine specification. This
enables platform independant compilation.

When the bytecode compiled programs are executed through the
Java interpeter, it converts those bytecodes into native
machine code and executes them through the JVM which is
specific to host environment it is running on. This enables
platform specific execution.

Is This Answer Correct ?    4 Yes 2 No

How java is platform independent?..

Answer / abhilesh rastogi.... bca from

java is platform independent due to the JVM. java program
does not directly interect with os. java program interect
with jvm. c/c++ program interect with os.

Is This Answer Correct ?    2 Yes 0 No

How java is platform independent?..

Answer / pranita yadav

Java is a fully object oriented programing language.Java is
aplatform independent language because,java is run any
where and any time of any operating system.The Write-Once-
Run-Anywhere ideal has not been achieved (tuning for
different platforms usually required), but closer than with
other languages.java is a user friendly programing
language.

Is This Answer Correct ?    2 Yes 1 No

How java is platform independent?..

Answer / nmnm

java is platform independent and object oriented language.

Is This Answer Correct ?    1 Yes 0 No

How java is platform independent?..

Answer / karthik

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 resides 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's bytecodes are desgined to be read and interpreted in
exactly same manner on any computer hardware or operating
system that supports Java Runtime Environment.

The Java Virtual Machine can be called a virtual operating
system that enables a java programme to run... we are thus
calling java platform independent because a java program
will not give different outputs on different machines but
platform dependent programmes tend to give different results
when compiled on different machines...

Is This Answer Correct ?    1 Yes 0 No

How java is platform independent?..

Answer / rajesh

Java is architectural neutral because after compilation of
the Java program it generates a byte codes which can be run
in any computer or operating system.
Java was designed to support application on networks, are
generally composed of a variety of CPU ans OS architectures.
so to enable this application Java compiler generates an
architecture neutral object file format which is only
readable by JVM. in the presence of JRE /Java runtime system.

Is This Answer Correct ?    3 Yes 3 No

How java is platform independent?..

Answer / meer

Java is platform indepent because when java compiler
compiles the java program, it does not directly convert the
code into host machine specific instruction as other
programming language compilers do, instead it creates a
bytecode which is a intermediate language code generated
for the virtual machine which can run on any platform.

Is This Answer Correct ?    0 Yes 0 No

How java is platform independent?..

Answer / sathish s t

java is platform independent because after compile the source file,then the byte code(.class) file is converted into machine code by the interpreter(jvm) and gives output,here clearly see that the machine code is converted by jvm not depends upon OS (operating system).so java is platform independent.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are Normalization Rules? Define Normalization?

0 Answers  


Default layout of panel and frame?

3 Answers  


what is the life cycle of jsp?

3 Answers   Photon,


how to run servlet program between two computer through the internet ?

2 Answers   Kiran Prakashan, TCS,


What is default locale java?

0 Answers  






What are the interfaces defined by Java.lang package?

1 Answers  


What does method mean?

0 Answers  


What is the difference between exception and error in java?

0 Answers  


What is the difference between preemptive scheduling and time slicing in java programming?

0 Answers  


Why there is no call by reference in java?

0 Answers  


Is JRE required to compile Java files ?

4 Answers   HCL,


Why java is free from garbage values??

4 Answers  


Categories