| In reality it is
not. Why? Because the in-built chip in different brand of TV
Remotes maybe different. Therefore the
same program has to run these two different chips, they have to be
re-compiled in order to suit different chips in other words
platforms. If there are 100 different brands, the same program has
to be re-compiled 100 times to suit these 100 different brands.
This is where the problem arises. That is why a new programming
language was needed. And Java was the answer.
How does Java
solve this problem?
The Java
designers came out with a wonderful concept of a 'Java Virtual
Machine'. Now Java differs from rest of the languages in using
this unique concept. Which means unlike other languages a Java
program when compiled produces a ByteCode rather than machine
code. This ByteCode is machine independant (platform independant).
The Java Virtual Machine resides on the machine and interprets
this ByteCode into a form the machine can understand.
Now take the same
example of a TV remote. If the program was developed using Java
rather than X, then the same program can be used in all different
brand of TV Remotes provided all of them have the 'Java
Virtual Machine' (JVM) installed on them. If all of them have the
JVM the JVM will convert this same program into a form that each
brand of TV remote understands. This is a very simple but
effective method of making a program portable. This is how Java
solves this problem.
Now that we
understand what is Java, move on to the Java
getting started guide.
|