I want to create hashes in Java the same way its done in Perl. I checked out the java API docs but in the java.util I see HashMap, HashSet, and HashTable. I googled for a quick explanation of how to use these but no help there either.
If anyone can clear up hashes in Java for me or post a helpful link I'd really appreciate it. Thanks.
Originally posted by Ernest Friedman-Hill: You want to use HashMap. There are no hash literals as there are in scripting languages like Perl, Python, or Ruby; you have to use explicit method calls. In Java 5: