This repository was archived by the owner on Dec 15, 2020. It is now read-only.
forked from bliblidotcom/training-java-future-program
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCalendar.java
More file actions
Latest commit
42 lines (40 loc) · 1.01 KB
/
Copy pathCalendar.java
File metadata and controls
42 lines (40 loc) · 1.01 KB
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
42
importjava.util.*;
publicclassCalendar
{
publicstaticvoidmain(Stringargs[])
{
if (args.length != 1){
System.out.println("Usage Calendar <numeric-month>");
return;
}
intmnth = Integer.parseInt(args[0]);
switch (mnth){
case1:
System.out.println("Month = January"); break;
case2:
System.out.println("Month = February"); break;
case3:
System.out.println("Month = March"); break;
case4:
System.out.println("Month = April"); break;
case5:
System.out.println("Month = May"); break;
case6:
System.out.println("Month = June"); break;
case7:
System.out.println("Month = July"); break;
case8:
System.out.println("Month = August"); break;
case9:
System.out.println("Month = September"); break;
case10:
System.out.println("Month = October"); break;
case11:
System.out.println("Month = November"); break;
case12:
System.out.println("Month = Desember"); break;
default:
System.out.println("Range Month are 1 - 12!");
}
}
}