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

advertisement

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

Dkrukovsky,
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.
[snippet]
Map<String, String> phoneBook = new HashMap<String, String>();
phoneBook.put("J. Random Hacker", "555-1337");
[/snippet]


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


[snippet]

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


);




1 to 1 of 1
1 to 1 of 1