Java Reference
In-Depth Information
8.
Within vm.jar, expand the java.lang package and resize the Package Explore pane so that it
looks like Figure 2-16 .
Figure 2-16.
Notice that the classes within the package are listed in alphabetical order and that the String.class file
is displayed.
The java.lang package contains the basic set of classes that come with Java. In fact, the classes are so fundamental
that all JREs automatically look in the java.lang package. What this means is that even though the class String is
stored in a different package (the java.lang package) than your application, the JRE will find the class.
Try to remember: the java.lang package is an exception. To access any other package's classes, the package must
be imported into your class. We will cover importing in detail in a later chapter.
9.
Click on the String.class expansion icon.
The display should look like Figure 2-17 . All of the variables and methods that comprise the String class are
displayed in the Navigation tree. We have said that Java classes (like Strings) are more complicated than we have let
on. This list should convince you.
Figure 2-17.
 
Search WWH ::




Custom Search