forked from bliblidotcom/training-java-future-program
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswitch1.java
More file actions
41 lines (40 loc) · 800 Bytes
/
switch1.java
File metadata and controls
41 lines (40 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
public class switch1
{
public static void main(String[] args){
if(args.length != 1){
System.out.println("----");
}
int m = Integer.parseInt(args[0]);
String bulan;
switch(m)
{
case 1 : bulan = "Januari";
break;
case 2 : bulan = "Februari";
break;
case 3 : bulan = "Maret";
break;
case 4 : bulan = "April";
break;
case 5 : bulan = "Mei";
break;
case 6 : bulan = "Juni";
break;
case 7 : bulan = "Juli";
break;
case 8 : bulan = "Agustus";
break;
case 9 : bulan = "September";
break;
case 10 : bulan = "Oktober";
break;
case 11 : bulan = "November";
break;
case 12 : bulan = "Desember";
break;
default : bulan = "Tidak Ada";
break;
}
System.out.println(bulan);
}
}