Seondly, and more importantly, the way the hashCode() method works in java allows for objects of any type to serve as hash keys. The original poster asked a question about the implementation of that method for Strings. (also: Perl allows for arbitrarily long hash keys, too, since any strings are hash keys, and strings are arbitrarily long)