In the JDK 7 release, you can use a String object in the expression of a switch statement.
public class Count{
public static void main(String args[]){
String s="sri";
switch(s){
case "SRI": System.out.print("SRI LANKA ");
case "Sri": System.out.print("Sri Lanka ");
case "sri": System.out.print("sri lanka ");
case "sRI": System.out.print("sRI lANKA ");
default: System.out.print("www.lanka.lk");
}
}
}
sri lanka sRI lANKA www.lanka.lk -
G -answers correct!!! no H