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 / sushil vashist

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 ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the program development process?

966


can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread

974


What is the abstract class?

1019


Can we extend a class with private constructor?

1000


What is the exact difference in between unicast and multicast object? Where we will use?

989


Can we execute a program without main() method?

1029


I want to print “hello” even before main is executed. How will you acheive that?

1077


Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

1151


How is the marker interface used in Java?

1090


What is the char data type?

993


Name container classes in java programming?

1085


Why packages are used?

1507


What is the static keyword?

1082


Can finally block be used without a catch?

1002


What is the difference between JDBC 1.0 and JDBC 2.0?

3174