Skip to content

Commit 1f9f8f9

Browse files
authored
Update SwitchCase.java
1 parent 4455c5a commit 1f9f8f9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

SwitchCase.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
//importando o scanner
12
import java.util.Scanner;
23

4+
//criando a classe
35
public class SwitchCase {
4-
6+
//criando um metodo main
57
public static void main(String[] args) {
68

9+
//objeto para scanear a tecla do usuario
710
Scanner mes = new Scanner(System.in);
11+
//imprimindo
812
System.out.println("Digite o mes");
9-
13+
//usando switch para ser chamado de acordo com oque o usuario digitar
1014
switch(mes.nextInt()) {
1115
case 1:
1216
System.out.println("Janeiro");

0 commit comments

Comments
 (0)