aspose file tools*
The moose likes Java in General and the fly likes hash table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "hash table" Watch "hash table" New topic
Author

hash table

sudesh shankar
Greenhorn

Joined: Jul 13, 2006
Posts: 1
write a program that accepts the name of a city as its command line argument .display the name of the country in which that city is located.store the city and country strings in a hash table.
provide appropriate feedback if the user doesnot include a command line argument or specifies a city that is not in the hash table.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

I take it that's an assignment you have to complete. Note that here at the Ranch, we're excited about helping people learn Java -- and very, very against people doing other people's homework for them.

In that vein, I'm afraid you won't be getting any help at all until you show us what you have so far, and ask for specific help on how to proceed.

[ EJFH: Note added later: ]

I see that you've posted all the questions from a whole test or interview here, each question in a separate thread. I've gone ahead and deleted all those for you, to save you the trouble of doing it yourself. Come back and post some specific questions when you have them; otherwise, you'll need to find some other way to cheat.
[ July 13, 2006: Message edited by: Ernest Friedman-Hill ]

[Jess in Action][AskingGoodQuestions]
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
a NullPointerException or IllegalArgumentException are usually pretty good feedback.


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hash table