Java Reference
In-Depth Information
Summary of Key Concepts
The new operator returns a reference to a newly created object.
Multiple reference variables can refer to the same object.
Usually a method is executed on a particular object, which affects the results.
A class library provides useful support when developing programs.
The Java standard class library is organized into packages.
All classes of the java.lang package are automatically imported for every
program.
A pseudorandom number generator performs a complex calculation to
create the illusion of randomness.
All methods of the Math class are static, meaning they are invoked through
the class name.
The printf method was added to Java to support the migration of legacy
systems.
Enumerated types are type-safe, ensuring that invalid values will not be used.
A wrapper class allows a primitive value to be managed as an object.
Autoboxing provides automatic conversions between primitive values and
corresponding wrapper objects.
Containers are special GUI components that hold and organize other
components.
A frame is displayed as a separate window, but a panel can be displayed
only as part of another container.
Every container is managed by a layout manager.
Panels can be nested to create an intricate containment hierarchy of com-
ponents.
A label can contain text, an image, or both.
Exercises
Visit www.myprogramminglab.com to complete many of these Exercises
online and get instant feedback.
EX 3.1
Write a statement that prints the number of characters in a
String object called overview .
EX 3.2
Write a statement that prints the 8th character of a String
object called introduction .
Search WWH ::




Custom Search