View Single Post
Old Nov 6th, 2006, 12:23 AM   #3
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 406
Rep Power: 5 xavier is on a distinguished road
Send a message via Yahoo to xavier
And a short example :
int n ;

switch(n){
   case 0:
   case 1:
   case 2: System.out.println ( "the number is <= 2"); break;
   case 3:
   case 4:
   case 5: System.out.println ( "the number is >=3 and <= 5"); break; 
   default :  System.out.println ( "the number is grater than 5"); break;
}
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote