Created
February 7, 2015 16:25
-
-
Save loiane/70964ce32131f7e337da to your computer and use it in GitHub Desktop.
switch-case java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
int valor = 1; | |
switch(valor){ | |
case 1: System.out.println("Valor é 1"); | |
System.out.println("Valor é 1 - outra mensagem"); | |
break; | |
case 2: System.out.println("Valor é 2"); | |
System.out.println("Valor é 2 - outra mensagem"); | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment