Java Reference
In-Depth Information
chapter
2
C
hapter 1 examined the Java primitive types. All types that are not one of
the eight primitive types are
reference types,
including important entities such
as strings, arrays, and file streams.
In this chapter, we will see
What a reference type and value is
n
How reference types differ from primitive types
n
Examples of reference types, including strings, arrays, and streams
n
How exceptions are used to signal erroneous behavior
n
what is a reference?
2.1
Chapter 1 described the eight primitive types, along with some of the opera-
tions that these types can perform. All other types in Java are reference types,
including strings, arrays, and file streams. So what is a reference? A
reference
variable
(often abbreviated as simply
reference
) in Java is a variable that
somehow stores the memory address where an object resides.
Search WWH ::
Custom Search