Java Reference
In-Depth Information
The
NameDirectory
class must be able to hold 20 different names. What statement
should replace
// answer goes here
for the class to function correctly?
a.
names[nameCount] = newName;
b.
names[nameCount] == newName;
c.
names[nameCount++] = newName;
d.
names[++nameCount] = newName;
The answer is available on the topic's website at
http://www.java21days.com.
Visit the
Day 19 page and click the Certification Practice link.
To extend your knowledge of the subjects covered today, try the following exercises:
1.
Create a simple XML format to represent a book collection with three topics and a
Java application that searches for topics with Joseph Heller as the author, display-
ing any that it finds.
2.
Create two applications: one that retrieves records from a database and produces an
XML file that contains the same information and a second application that reads
data from that XML file and displays it.
Where applicable, exercise solutions are offered on the topic's website at
http://www.
19