Java Reference
In-Depth Information
Perform the following steps to enter code for the Date constructor to
construct an instance of the system date.
To Code a Call to a System Date Constructor
1. Click the TextPad coding window, immediately to the right of the main()
method's opening brace in line 15.
The insertion point displays to the right of the brace in line 15
(Figure 2-36).
main method
opening
brace
insertion
point
FIGURE 2-36
2. Press the ENTER key and then type line 16 as shown in Figure 2-33 on
page 79.
The Date constructor to construct a system date is displayed (Figure 2-37).
A line comment explains the code by noting that this is a Date constructor.
Date
constructor
code
line comment
FIGURE 2-37
 
Search WWH ::




Custom Search