What is Java?
Java is a walking toaster! Ha! Ha! Ha! At least, it started that way at Sun Microsystems in a project to write software for toasters and other electronic devices, except for the walking part!
Java is really a programming language. It is also object-oriented, and can be run on any machine because Java is platform independent. All that is needed is a Java interpreter, and a Java compiler.
The reason Java can be run on any machine is the Java compiler writes bytecodes. Bytecodes are almost like machine code, but work on more than one type of processor. The Java interpreter (also called the Java virtual machine, or the Java runtime) reads the bytecode and executes the program. Easy, right!
So, all that needs to be done is write the Java program, compile it, and run it!
There is one thing you must get clear: Java is not JavaScript! The names are similar, but the languages are different! Don’t get them confused, Java has nothing to do with JavaScript! Got it?
Java can also be run in web browsers by writing a Java applet in a web page using <APPLET/> tags. This can be used to make good looking and useful pages.
To demonstrate, we have written a game in Java, if your browser is able to run Java you should see the game applet just below.
Drag the cheese around and try to keep the mouse from eating it! If the mouse eats the cheese, the game resets!

|