Java Reference
In-Depth Information
Why Is the Language Named “Java”?
The current custom is to name programming languages according to the whims of their
designers. Java is no exception. There are conflicting explanations of the origin of the name
“Java.” Despite these differing stories, one thing is clear: The word “Java” does not refer
to any property or serious history of the Java language. One believable story about where
the name came from is that it was thought of when, after a fruitless meeting trying to come
up with a new name for the language, the development team went out for coffee. Hence,
the inspiration for the name “Java.”
simulated airplanes might belong to the same class, probably called the Airplane
class. All objects within a class have the same methods. Thus, in a simulation program,
all airplanes have the same methods (or possible actions), such as taking off, flying
to a specific location, landing, and so forth. However, all simulated airplanes are not
identical. They can have different characteristics, which are indicated in the program
by associating different data (that is, some different information) with each particular
airplane object. For example, the data associated with an airplane object might be two
numbers for its speed and altitude.
If you have used some other programming language, it might help to explain
Java terminology in terms of the vocabulary used in other languages. Things that are
called procedures , methods , functions , or subprograms in other languages are all called
methods in Java. In Java, all methods (and for that matter, any programming constructs
whatsoever) are part of a class . As we will see, a Java application program is a class
with a method named main ; when you run the Java program, the run-time system
automatically invokes the method named main (that is, it automatically initiates the
main action). An application program is a “regular” Java program, and, as we are
about to see, there is another kind of Java program known as an applet . Other Java
terminology is pretty much the same as the terminology in most other programming
languages and, in any case, will be explained when each concept is introduced.
application
program
Applets
There are two kinds of Java programs, applets and applications . An application, or
application program, is just a regular program. Although the name applet may sound
like it has something to do with apples, it really means a little Java application , not
a little apple. Applets and applications are almost identical. The difference is that
applications are meant to be run on your computer like any other program, whereas an
applet is meant to be run from a Web browser, and so can be sent to another location
on the Internet and run there. Applets always use a windowing interface, but not all
programs with a windowing interface are applets , as you will see in Chapters 16 - 18 .
Although applets were designed to be run from a Web browser, they can also be
run with a program known as an applet viewer . The applet viewer is really meant
applet
application
applet viewer
 
Search WWH ::




Custom Search