×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Vasilii Vasilev
Added: May 2, 2014 9:41 AM
Views: 9
  1. int i = 10;
  2. switch (i) {
  3.     case 1:
  4.         System.out.println("one");
  5.         break;
  6.     case 2:
  7.         System.out.println("two");
  8.         break;
  9.     case 3:
  10.         System.out.println("three");
  11.         break;
  12.     default:
  13.         System.out.println("not valid");
  14.                    
  15. }