JAVA 枚举详解
来源:互联网 发布:java给文件夹重命名 编辑:程序博客网 时间:2024/06/08 02:48
--------------1:
public class enuml {
public enum Color{
RED,BLUE,BLACK,YELLOW,GREEN
}
public static void main(String[] args) {
Color color=Color.BLUE;
switch(color){
case RED: System.out.println("it's red");break;
case BLUE: System.out.println("it's blue");break;
case BLACK: System.out.println("it's blue");break;
}
}
}
public class enuml {
public enum Color{
RED,BLUE,BLACK,YELLOW,GREEN
}
public static void main(String[] args) {
Color color=Color.BLUE;
switch(color){
case RED: System.out.println("it's red");break;
case BLUE: System.out.println("it's blue");break;
case BLACK: System.out.println("it's blue");break;
}
}
}
-------------------------------------------
it's blue
-------------------------------------------------------------------------2:
- java枚举使用详解
- java枚举使用详解
- java枚举使用详解
- java 枚举用法详解
- JAVA 枚举详解
- java枚举使用详解
- Java枚举的详解
- java 枚举用法详解
- java枚举使用详解
- java枚举详解实例
- java枚举使用详解
- Java枚举类详解
- java 枚举详解
- java枚举使用详解
- java枚举使用详解
- java枚举使用详解
- java枚举使用详解
- java枚举使用详解
- php5.3在windows下使用PEAR
- Ubuntu系统优化
- 一个DirectInput演示程序
- 跟我一起写Makefile
- 套接字编程
- JAVA 枚举详解
- 【点滴收藏】typedef 与 define
- 关于COM的一点总结(1)
- 动态内存分配
- CSS选择器
- Windows Store apps开发[35]如何创建自己的Windows Store账号来提交Apps
- volatile 修饰的变量"副作用/序列点"问题
- Oracle数据库导入
- oracle共享模式与专用模式使用上的区别