If you’ve heard of the Web, then you probably have heard about Java and how it has something to do with the Internet. In reality, it isn=t used all that much. It could be very useful, but that is all — could be. For the most part, it’s the latest rage and one of the newest buzz words.
To understand Java, you need a little background in programming. So little, in fact, that I will tell it to you right now. Any application that you have on your computer was originally many lines of computer code. This code would tell the computer to open a window, draw to the window, do some arithmetic, or even open a file. The point being, everything that a program does, is a line of code written by a programmer.
There are many different “languages” that programmers will use to write these lines of code to make a program. It’s a lot like real life languages. If someone is fluent in English and Spanish, they can write the same thing in each. All computer languages can do the same things, but are implemented differently.
For example, in the programming language BASIC, you can put something on the screen by typing: print “whatever.” In the language Pascal, you can do the same thing by typing: write(‘whatever’) . Those two commands will put the word “whatever” on the screen.
Java is another language just like BASIC or Pascal. It’s based on the C and C++ languages, though. Therefore, its syntax is different, but everything can still be done. One of the benefits of Java is that it can be made so that it doesn’t rely on a brand of computer to run.
Most computer languages are compiled (made into a program) so that they can only run on a specific operating system. If you try to run a Macintosh program on a DOS computer, it will not work. If the programmer wanted to have his program work on a different operating system, he would have to take the original code, modify it to run on a different system and recompile it. Java can be compiled in two ways. One way is like every other language, in that it can only run on one system. It can also be compiled so that it will work on any system. This is called a Java applet, while the former is simply called a Java program.
To run a Java applet, one must have a Java interpreter on their computer. The interpreter takes the Java commands and lets it run on the computer. One downside to this is that two different interpreters could make the program different in terms of speed or reliability. Generally speaking, Java applets are not very complex programs in which this would make a difference. Netscape Navigator 2.0 and later has a Java interpreter in it.
Brian Koponen (email@example.com)