java:枚举

package com.javaSE;
public class Test 
{ 
     public static void main(String[] args) {
    	 Colors colors;
    	 colors = Colors.BLUE;
    	 System.out.println(colors);
		/*for(Colors c:Colors.values()){
			System.out.println(c);
		}
		System.out.println("value of: "+Colors.RED);*/
     }
     
     public static Colors getCorlor(){
    	 
    	 return Colors.RED;
     }
} 

  

posted @ 2012-07-31 11:12  ligang305  阅读(114)  评论(0编辑  收藏  举报