Java Reference
In-Depth Information
Summary of Key Concepts
The print and println methods represent two services provided by the
System.out object.
An escape sequence can be used to represent a character that would other-
wise cause compilation problems.
A variable is a name for a memory location used to hold a value of a par-
ticular data type.
Accessing data leaves it intact in memory, but an assignment statement
overwrites the old data.
We cannot assign a value of one type to a variable of an incompatible type.
Constants hold a particular value for the duration of their existence.
Java has two kinds of numeric values: integer and floating point. There are
four integer data types and two floating point data types.
Java uses the 16-bit Unicode character set to represent character data.
Expressions are combinations of operators and operands used to perform
a calculation.
Java follows a well-defined set of precedence rules that governs the order
in which operators will be evaluated in an expression.
Narrowing conversions should be avoided because they can lose information.
The Scanner class provides methods for reading input of various types
from various sources.
Graphical data is represented by dividing it into many small pieces called pixels.
Java's coordinate system has the origin in the upper-left corner and all
visible coordinates are positive.
Colors are represented in Java using an RGB value—three values that
represent the contributions of the primary colors red, green, and blue.
The Color class contains several predefined colors that are commonly
used, and can be used to define many others.
Applets are Java programs that are usually transported across a network
and executed using a Web browser.
Most shapes can be drawn filled (opaque) or unfilled (as an outline).
A bounding rectangle is used to define the position and size of curved
shapes such as ovals.
An arc is a segment of an oval beginning at a specific start angle and
extending for a distance specified by the arc angle.
Search WWH ::




Custom Search