8000 add enum example · fishercoder1534/RandomJava@e29bbac · GitHub
[go: up one dir, main page]

Skip to content

Commit e29bbac

Browse files
add enum example
1 parent 21195c2 commit e29bbac

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package randomExamples;
2+
3+
public class EnumExamples {
4+
public static void main(String... args) {
5+
System.out.println(RequestType.GET);
6+
System.out.println(RequestType.GET == RequestType.GET);
7+
System.out.println(RequestType.GET.name());
8+
}
9+
}
10+
11+
enum RequestType {
12+
GET,
13+
PUT,
14+
POST,
15+
PATCH,
16+
DELETE
17+
}

0 commit comments

Comments
 (0)
0