Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mappings A map is a correspondence between two sets of values. A map can be represented explicitly or implicitly: –{ (0,0), (1,1), (2,4), (3,9), (4,16),

Similar presentations


Presentation on theme: "Mappings A map is a correspondence between two sets of values. A map can be represented explicitly or implicitly: –{ (0,0), (1,1), (2,4), (3,9), (4,16),"— Presentation transcript:

1 Mappings A map is a correspondence between two sets of values. A map can be represented explicitly or implicitly: –{ (0,0), (1,1), (2,4), (3,9), (4,16), (5,25), (6,36) } –f(x) = x 2 Explicit representation can be expressed in different ways.

2 HashMap A HashMap is a data structure which holds pairs of values. –the first element of the pair is called the key –the second element of the pair is called the value Example: –UB number : transcript –DL number : driving record –Grocery store keytag number : shopping record –java.awt.point : graphics.Rectangle

3 HashMap is not a Collection


Download ppt "Mappings A map is a correspondence between two sets of values. A map can be represented explicitly or implicitly: –{ (0,0), (1,1), (2,4), (3,9), (4,16),"

Similar presentations


Ads by Google