-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenum_array.java
More file actions
26 lines (23 loc) · 497 Bytes
/
enum_array.java
File metadata and controls
26 lines (23 loc) · 497 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
public class enum_array {
public static void main(String args[]) {
WeekDays enum_arr[] = WeekDays.values();
for (WeekDays day:enum_arr) {
System.out.println(day);
}
for (Clolor a:Clolor.values()) {
for (Clolor b:Clolor.values()) {
for (Clolor c:Clolor.values()) {
if (a != b && a != c && b != c) {
System.out.println(a +","+ b +","+ c +"|");
}
}
}
}
}
}
enum WeekDays {
sun, mon, tue, wed, thu, fri, sat
}
enum Clolor {
红, 蓝, 绿, 黄, 黑
}