Java Reference
In-Depth Information
What will be the value of x when it is displayed?
a. 9.0
b. 11.0
c. 15.0
d. The program will not compile.
The answer is available on the topic's website at http://www.java21days.com. Visit the
Day 4 page and click the Certification Practice link.
Exercises
To extend your knowledge of the subjects covered today, try the following exercises:
1. Using the countDays() method from the DayCounter application, create an appli-
cation that displays every date in a given year in a single list from January 1 to
December 31.
2. Create a class that takes words for the first 10 numbers (“one” up to “ten”) and
converts them into a single long integer. Use a switch statement for the conversion
and command-line arguments for the words.
Where applicable, exercise solutions are offered on the topic's website at http://www.
java21days.com.
 
Search WWH ::




Custom Search