-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContinents.java
More file actions
40 lines (25 loc) · 931 Bytes
/
Continents.java
File metadata and controls
40 lines (25 loc) · 931 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
public class Continents {
public static void main(String[] args) {
//displays the continents of the world.
int continent = 4;
switch(continent)
{
case 1 : System.out.println("North America : Mexico City, Mexico");
break;
case 2 : System.out.println("South America : Sao Paulo, Brazil");
break;
case 3 : System.out.println("Europe : Moscow, Russia");
break;
case 4 : System.out.println("Africa : Lagos, Nigeria");
break;
case 5 : System.out.println("Asia : Shanghai, China");
break;
case 6 : System.out.println("Australia : Sydney, Australia");
break;
case 7: System.out.println("Antarctica : McMurdo station, US");
break;
default : System.out.println("Undefined continent!");
break;
}
}
}