For key values you can use int or enum constants(JDK 5.0).
Now, if a key is supplied the switch body is executed. If a case is met then the appropriate action is performed. If no case is tested true then control goes to default statement and it is executed. In case there is no default then switch block is ended without any action.
Hope that helps.
[Should have mentioned this before] PS. Please don't write subject line in caps as it is considered rude and is like shouting in the forum. [ April 03, 2008: Message edited by: Anubhav Anand ]
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop