02115 Java Programming | ||
Autumn 2011 |
ArrayList
in section
8.9 of our BK textbook where wrapper classes are
introduced. For a Map we could e.g. write
HashMapAnd then in the command line interface a:bookings = new HashMap (); bookings.put(1, new Book( ... ));
System.out.println(bookings.get(1));will work if a
toString()
method of class
Book
is present and will give a printout of the
Book
-object having the key 1
in our
bookings
map
main()
method of the system
Newest edition: 23. November
Previous editions:
- 8. April (just teh heading and the footing)