exam question - follow-up point

Have now resolved the previous coding problem...many thanks to all who helped and aided my understanding.

as a follow-up question -

is it possible to reference "Sets" as an object in a "Map"

the exam question requires a "Map" to be created referencing a String "studentName" and the collection of books that the "student" has read (see previous coding question - http://forum.java.sun.com/thread.jspa?threadID=5196761)

current code is as follows (the Map studentRecords has previously been referenced as a private instance variable):-

publicvoid createReadingRecords()

{

String studentName;

Set<String> booksRead =new HashSet<String>();

do

{

studentName = (OUDialog.request("Please input the student name or * to finish","));

}

while

(!studentName.equals("*"));

booksRead = this.collectBooksRead();

studentRecords.put(studentName,booksRead);

}

[1305 byte] By [BrianSouthalla] at [2007-11-27 11:06:43]
# 1

The Set is the "value" of the map, which is stored under a "key", which is the student name. You can use the get(key) method of the map to retrieve the value associated with that key, or you can get a collection of all the values with the values() method.

hunter9000a at 2007-7-29 13:17:20 > top of Java-index,Java Essentials,Java Programming...
# 2

are you taking this exam now? Is it a take-home test?

petes1234a at 2007-7-29 13:17:20 > top of Java-index,Java Essentials,Java Programming...