Friday, 4 May 2018

JDK 1.7 Features:----
String in Switch Expression:--------------

package govind;

public class StringPassInSwitch {

public static void main(String[] args) {
String version="j2se";
switch(version)
{
    case "j2se":
    System.out.println("java 2 standard edition:-using j2se you can develop desktop application");
break;
case "j2ee":
System.out.println("java 2 enterprise edition:-using j2ee you can develop web application");
break;
case "j2me":
System.out.println("java 2 micro edition:-The basic aim of this edition was to work on mobiles, wireless devices, set top boxes etc");
break;
default:
System.out.println("java is plateform independent language");

}
}
}


o/p:--------------------
java 2 standard edition:-using j2se you can develop desktop application

No comments:

Post a Comment