scala:Use a Hash Table

From Progzoo
Jump to navigation Jump to 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


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