Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

switch java

int x = 5;
switch(x) {
case 1:
    System.out.println("You entered 1");
    break;
case 2:
    System.out.println("You entered 2");
    break;
default:
    System.out.println("You entered: "+x);
}	
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #switch #java
ADD COMMENT
Topic
Name
4+9 =