Java Reference
In-Depth Information
either case, whether the scroll bar should always appear, never appear,
or appear as needed to be able to view the underlying component.
SR 11.28
If you change the first parameter passed to the Dimension constructor
within the TransitMap program to 1000, when the map appears, it is in
a wider container—there is no horizontal scroll bar at the bottom of the
map, because the entire width of the map already fits in the container.
11.10 Split Panes
SR 11.29
Divider bars separate split panes into distinct right/left or top/bottom
sections. The bars can be dragged to make one section larger and the
other section smaller so that users can control what they see.
SR 11.30
In general, all of the options of a JList object are visible to the user,
whereas with a combo box the user must “open” the box to see the
options.
Chapter 12 Recursion
12.1 Recursive Thinking
SR 12.1
Recursion is a programming technique in which a method calls itself,
solving a smaller version of the problem each time, until the terminat-
ing condition is reached.
SR 12.2
The recursive part of the definition of a List is used nine times to
define a list of 10 numbers. The base case is used once.
SR 12.3
Infinite recursion occurs when there is no base case that serves as a
terminating condition or when the base case is improperly specified.
The recursive path is followed forever. In a recursive program, infi-
nite recursion will often result in an error that indicates that available
memory has been exhausted.
SR 12.4
A base case is always required to terminate recursion and begin the
process of returning through the calling hierarchy. Without the base
case, infinite recursion results.
SR 12.5
5 * n = 5 if n = 1, 5 * n = 5 + (5 * (n − 1)) if n > 1
12.2 Recursive Programming
SR 12.6
Recursion is not necessary. Every recursive algorithm can be written
in an iterative manner. However, some problem solutions are much
more elegant and straightforward when written recursively.
Search WWH ::




Custom Search