KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > EmptyCase


1 public class EmptyCase {
2
3     public static void main (String JavaDoc [] args) {
4         String JavaDoc test = "jr47wwey5";
5         for (int i = 0; i < test.length(); i++) {
6         
7             char c = test.charAt(i);
8             switch(c){
9             
10                 case 'j': {System.out.println("Smile"); break;}
11                 case '7': {System.out.println("Happy"); break;}
12                 case '4':
13                 case '5':
14
15             }
16         }
17     }
18 }
19
Popular Tags