Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How java is platform independent?

Answer Posted / steve

Java was designed to not only be cross-platform in source
form like C, but also in compiled binary form. Since this is
frankly impossible across processor architectures Java is
compiled to an intermediate form called byte-code. A Java
program never really executes natively on the host machine.
Rather a special native program called the Java interpreter
reads the byte code and executes the corresponding native
machine instructions. Thus to port Java programs to a new
platform all that is needed is to port the interpreter and
some of the library routines. Even the compiler is written
in Java. The byte codes are precisely defined, and remain
the same on all platforms.

The second important part of making Java cross-platform is
the elimination of undefined or architecture dependent
constructs. Integers are always four bytes long, and
floating point variables follow the IEEE 754 standard for
computer arithmetic exactly. You don't have to worry that
the meaning of an integer is going to change if you move
from a Pentium to a PowerPC. In Java everything is guaranteed.

However the virtual machine itself and some parts of the
class library must be written in native code. These are not
always as easy or as quick to port as pure Java programs.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you clear a list in java?

1040


What is the purpose of file class?

962


Explain the difference between association, aggregation and inheritance relationships.

1025


What is scope & storage allocation of static, local and register variables? Explain with an example.

962


Can we make main() thread as daemon?

1031


What is the common usage of serialization?

1067


What is the difference between Java and C++?

1124


Why java is call by value?

978


What do you understand by synchronization?

985


What is thread synchronization in java?

858


Can we sort a map in java?

972


How do you pass by reference?

986


What are internal variables?

940


Explain the difference between the public, private, final, protected, and default modifiers?

984


What is procedure overloading?

2241