Java Reference
In-Depth Information
Remember, you can't start an identifier with a digit. Thus,
12x
is invalid, for example.
You cannot use any of the Java keywords as identifier names. Also, you should not use
the name of any standard method, such as
println
, as an identifier. Beyond these two re-
strictions, good programming practice dictates that you use identifier names that reflect the
meaning or usage of the items being named.
The Java Class Libraries
The sample programs shown in this chapter make use of two of Java's built-in methods:
println( )
and
print( )
. These methods are accessed through
System.out
.
System
is a class
predefined by Java that is automatically included in your programs. In the larger view, the
Java environment relies on several built-in class libraries that contain many built-in meth-
ods that provide support for such things as I/O, string handling, networking, and graph-
ics. The standard classes also provide support for a graphical user interface (GUI). Thus,
Java as a totality is a combination of the Java language itself, plus its standard classes. As
you will see, the class libraries provide much of the functionality that comes with Java.
Indeed, part of becoming a Java programmer is learning to use the standard Java classes.
Throughout this topic, various elements of the standard library classes and methods are de-
scribed. However, the Java library is something that you will also want to explore more on
your own.
Chapter 1 Self Test
A.
count
B.
$count
C.
count27