HTW Berlin Fachbereich 4 Internationaler Studiengang Internationale Medieninformatik (Bachelor) Info 1: Informatik I Winter Term 2022/23 |
Laboratory 6:
Technical Support
|
Pre-lab
This week's lab work is intended give you practice using the Random class and HashMaps.
Please bring these exercises printed out or written out with you to lab. Please have your name on your page.
P1. Using the Java documentation on Map and HashMap, write a short paragraph explaining what a HashMap is, what its purpose is and how it is used.
P2. HashMap is a parameterized class. List the methods that depend on the types used to parameterize it. Do you think the same type could be used for both parameters?
P3. How do you check how many entries are contained in a map? What happens when you add an entry to a map with a key that already exists in the map? How do you print out all the keys currently stored in a map?
P4. Where can you find information about javadoc on the Internet?
Lab assignments are due the night before your next class at 22.00. They may, of course, be turned in earlier. You hand them in by preparing the report in PDF and submitting it to Moodle.
Assignment
Technical Support
Writeup
Submit your writeup as your post-lab to the Moodle area.