scala:Use a Hash Table

From Progzoo
Jump to: navigation, search

Map can be used as a hash map.

A hash map is like an array but you can use Strings instead of integers to index the values. You don't have to use String... pretty much any type can be used.

In this example we store telephone extension numbers against names

NameExt
andrew2753
gordon2754


[Font] [Default] [Show] [Resize] [History] [Profile]