java emun µÄ±ðÑùÓ÷¨£¬¿ÉÒÔѧϰÏ£¬
package com.zwc.www.test;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class OperateEnum {
//first emun
enum PeopleTypeOne{RED,YELLOW,BLACK};
//second emun
public enum PeopleTypeTwo{
RED("a","#111111"),
YELLOW("b","#222222"),
BLACK("c","#333333");
private String value1;
×¢Ò⣺ÕâÀïµÄ¶¨Òå¿ÉÒÔ¶¨ÒåΪfinal ÍêÈ«¿ÉÒÔ±àÒëͨ¹ý£¬¿ÉÒÔÔËÐУ¬ºÃÏñÕâÊÇjavaµÄÒ»¸öbug
private String value2;
×¢ÒâÕâÀïµÄ¹¹Ôì·½·¨£¬Ó¦¸ÃÓëÄãÉÏÃæµÄ¶¨Ò壬±£³ÖÒ»Ö£¬
»¹ÓУº²»Äܶ¨ÒåΪpublic £¬Ö»ÄÜÊÇĬÈϵÄȨÏÞ£¬»òÕßÊÇprivate
PeopleTypeTwo(String value1,String value2){
this.value1 = value1;
this.value2 = value2;
}
×¢Ò⣺ÕâÀïµÄ·½·¨µÄ¶¨Ò壬ÍêÈ«ÊÇΪÁ˳ÌÐòÍâÃæµÄ·ÃÎÊ£¬ÈçÏÂÃæmainº¯ÊýµÄµ÷Óã¬
ÕâÀÆäʵÍêÈ«¿ÉÒÔÓÃÒ»¸öget·½·¨£¬Ö±½Ó·µ»Ø¶ÔÓ¦µÄÖµ£¬Èç #222222 £¬µ«ÊÇΪÁ˲âÊÔÕâÀïÊÇ·ñÖ§³Ömap£¬ËùÒÔ£¬¾ÍÓÃÁËmap£¬ÏÂÃæµÄÀý×Ó£¬Ò²µ÷ÓÃÁËmap£¬¾ßÌå¿ÉÒÔ£¬²Î¿¼ÏÂÃæµÄ´úÂ룬
public Map<String,String> getMap(){
Map<String,String> map = new HashMap<String,String>();
map.put(this.value1, this.value2);
return map;
}
}
public static void main(String[] args) {
//first emun
PeopleTypeOne p1 = PeopleTypeOne.BLACK;
System.out.println("tradition:" + (p1.ordinal() + 1));
//second emun
PeopleTypeTwo p2 = PeopleTypeTwo.RED;
Map<String,String> map = p2.getMap();
Iterator<String> i = p2.getMap().keySet().iterator();
while(i.hasNext()){
String key = i.next();
String value = map.get(key);
System.out.println("key=" + key + " value=" + value);
}
}
}
Ïà¹ØÎĵµ£º
2008 Äê 6 ÔÂ 24 ÈÕ
ÔÎĵØÖ·£º http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
±¾ÎĽéÉÜ IBM FileNet P8 4.0 Platform ÌṩµÄ Content Java API¡£Ê×ÏÈ¶Ô FileNet P8 Content Engine ºÍ API ½øÐиÅÒª½éÉÜ, ²¢ËµÃ÷ÁËһЩ»ù±¾¸ÅÄËæºóÏêϸ½éÉÜÁË FileNet Content EngineÌṩµÄ»ùÓÚ EJB ......
javaÓëmysqlÂÒÂëµÄÎÊÌâ
javaÓëmysqlÂÒÂëµÄÎÊÌâ
¹Ø¼ü×Ö: javaÓëmysqlÂÒÂëµÄÎÊÌâ
½â¾ö·½·¨Ò»:(×îÖØÒªµÄÒ»ÖÖ·½·¨)
Äã¿´ÏÂmy.ini£¬ÓÐÎÞ
[mysql]
default-character-set=utf8
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
È»ºó½¨Á¢±íʱ£¬Ò²ÒªÓ㨱ÈÈ磩
DROP TABLE IF ......
×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......
ÇëÌṩһ¸ö¶ÔiµÄÉùÃ÷£¬½«ÏÂÃæµÄÑ»·×ª±äΪһ¸öÎÞÏÞÑ»·¡£Õâ¸öÑ»·²»ÐèҪʹÓÃÈκÎ5.0°æµÄÌØÐÔ£º
while (i != 0 && i == -i) {
}
ÕâÈÔÈ»ÊÇÒ»¸öÑ»·¡£ÔÚ²¼¶û±í´ïʽ(i != 0 && i == -i)ÖУ¬Ò»Ôª¼õºÅ²Ù×÷·û×÷ÓÃÓÚi£¬ÕâÒâζ×ÅËüµÄÀàÐͱØÐëÊÇÊý×ÖÐ͵ģºÒ»Ôª¼õºÅ²Ù×÷·û×÷ÓÃÓÚÒ»¸ö·ÇÊý×ÖÐͲÙ×÷ÊýÊÇ·Ç·¨µÄ¡£Òò´Ë£ ......