document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. public class SwitchStatementExample {
  2.  
  3.         public static void main(String[] args) {
  4.                  
  5.                 for(int i=0; i <= 3 ; i++)
  6.                 {
  7.                         switch(i)
  8.                         {
  9.                                 case 0:
  10.                                         System.out.println("i is 0");
  11.                                         break;
  12.                                
  13.                                 case 1:
  14.                                         System.out.println("i is 1");
  15.                                         break;
  16.                                
  17.                                 case 2:
  18.                                         System.out.println("i is 2");
  19.                                         break;
  20.                                
  21.                                 default:
  22.                                         System.out.println("i is grater than 2");
  23.                                        
  24.                         }
  25.                 }
  26.         }
  27. }
');