java的枚举的定义和使用

public emun EmunName
{
     webName,webUrl;
}
//按网站名称查询
(select_Url.equals(SearchUrl.webName.toString()))
{
pageUtil = urlService.listSearchUrlByWebName(vKey, page, PageUnit.pageSize);
}
//按网站网址查询
else if(select_Url.equals(SearchUrl.webUrl.toString()))
{
pageUtil = urlService.listSearchUrlByWebUrl(vKey, page, PageUnit.pageSize);
}

 

<select name="Select_Url" id="Select_Url">
<option value="webName" <c:if test="${fn:contains(select_Url,'webName')}">selected</c:if>>网站名称</option>
<option value="webUrl"  <c:if test="${fn:contains(select_Url,'webUrl')}">selected</c:if>>网站链接</option>
</select>

 

枚举在编译后会生成 public final static String aa="aa";

你可能感兴趣的:(java)