| Author |
SWITCH
|
Honey Khumalo
Greenhorn
Joined: Mar 28, 2008
Posts: 6
|
|
|
What happens if the switch statement tests false?
|
 |
Anubhav Anand
Ranch Hand
Joined: May 18, 2007
Posts: 341
|
|
A switch statement works for a key 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 ]
|
 |
 |
|
|
subject: SWITCH
|
|
|