ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Design Tips for Building Tag Clouds
Subject:   Correction
Date:   2006-06-15 04:17:53
From:   KristoferHoch
Response to: Correction

I believe the type of Associative array that Jim is speaking of, is a be more free than the Java generic.

Take the example you provided for instance. That Map can only take a String and Another String.
Map<String, String> phoneBook = new HashMap<String, String>();
phoneBook.put("J. Random Hacker", "555-1337");

It cannot nest in more Maps because the phone book only accepts String objects. In Perl, you can do some crazy things like ...


%phonebook =
'name' =>
{'J. Random Hacker',


1 to 1 of 1
1 to 1 of 1