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 conflicting 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 “Java” came from is that the name was thought of when, after a fruitless meet-
ing trying to come up with a new name for the language, the development team went out
for coffee, and hence the inspiration for the name “Java.”
simulated airplanes might belong to the same class, probably called the
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 iden-
tical. They can have different characteristics, which are indicated in the program by
associating different data (that is, some different information) with each particular air-
plane 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 terminology used in other languages. Things that are
called
Airplane
procedures,
methods,
functions,
or
subprograms
in other languages are all called
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
methods
application
program
is a class
application
program
, and when you run the Java program, the run-time system
automatically invokes the method named
with a method named
main
(that is, it automatically initiates the
main
action). An application program is a “regular” Java program; 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.
main
Applets
applet
application
There are two kinds of Java programs,
. An application or
application program is just a regular program. Although the name
applets
and
applications
applet
may sound
like it has something to do with apples, the name 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
is meant to be run from a Web browser, and so can be sent to another loca-
tion 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
applet viewer
. The applet viewer is really meant as
applet viewer
Search WWH ::




Custom Search