Java enum(?????????
???????????? ???????[ 2016/1/19 10:35:33 ] ??????????????????? ???????
????3?????????????·??? + ????
??????????ó??????????????y?????????????????????????????IWeekConstants ????MON?????Mon????????????????????????塣????????????÷???????????????????
?????????????????????????????????????????дtoString???????????????????£?
package com.zcr.test;
enum ActionTypeEnum{
//?????????????????????????ι???????????????????????????????
//?????????????????????????????????????????????????????д????????????????????
????(1??"xiazai")??????(2??"fangwen");
int index;
String name;
private ActionTypeEnum(int index??String name){
this.index = index;
this.name = name;
}
public int getIndex()
{
return index;
}
public void setIndex(int index)
{
this.index = index;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
}
public class EnumTest
{
public static void main(String[] args)
{
ActionTypeEnum[] actionTypeEnums = ActionTypeEnum.values();
for(ActionTypeEnum actionTypeEnum : actionTypeEnums){
System.out.println("name=" + actionTypeEnum.getName());
System.out.println("index= " + actionTypeEnum.getIndex());
System.out.println("oridary=" + actionTypeEnum.ordinal());
System.out.println("this = " + actionTypeEnum);
System.out.println("???????" + actionTypeEnum.valueOf("????"));
System.out.println("name()????= " + actionTypeEnum.name());
System.out.println("--------------????????------------------");
}
}
}
???????н????
????name=xiazai
????index= 1
????oridary=0
????this = ????
???????????????
????name()????= ????
????--------------????????------------------
????name=fangwen
????index= 2
????oridary=1
????this = ????
???????????????
????name()????= ????
????--------------????????------------------
????4?????
????????? enum ?????????????? class???????????????Щ???????????????????enum ??????? extends ???????????????? enum ???????? java.lang.Enum??java??????У??????????н???
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????