CS 1114 Lecture Notes - Lecture 13: Instance Variable, Local Variable, Control Unit
Document Summary
Upcoming assignments: complete program vi due m, 12/11 at 23:59; begin lab xiv due f, 12/08 at 16:30. Notes: maps are collections that contain pairs of values. Each pair consists of a key and a value. Normally, the user will look up and retrieve a value by supplying a key to look for. Each unique key in a map can be only used once a map represents a relationship between the keys it contains and their corresponding values. ***note: both keys and values are objects: example: a telephone book, example: maps can be inside of maps. Piazza contains the university name and the classes within the university. java. util. map (also java. util. hashmap) is an interface; therefore, we cannot instantiate it we can only create new objects from a concrete class. One must specify the type for the key and value: example: declaring a map. Map myfriends = new hashmap(): example: common operations.