添加代码到 GITHub 中
This commit is contained in:
parent
76c4731598
commit
f4ca94a24b
@ -0,0 +1,23 @@
|
|||||||
|
package com.ossez.lang.tutorial.overview;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Java Tutorial Enums
|
||||||
|
*
|
||||||
|
* @author YuCheng
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class FreshJuice {
|
||||||
|
enum FreshJuiceSize {
|
||||||
|
SMALL, MEDIUM, LARGE
|
||||||
|
}
|
||||||
|
|
||||||
|
FreshJuiceSize size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class FreshJuiceEnums {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
FreshJuice juice = new FreshJuice();
|
||||||
|
juice.size = FreshJuice.FreshJuiceSize.MEDIUM;
|
||||||
|
System.out.println("Size: " + juice.size);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user