Skip to content

Instantly share code, notes, and snippets.

@loiane
Created February 7, 2015 16:25
Show Gist options
  • Save loiane/70964ce32131f7e337da to your computer and use it in GitHub Desktop.
Save loiane/70964ce32131f7e337da to your computer and use it in GitHub Desktop.
switch-case java
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