当前位置: 技术问答>JAVA环境变量配置问题?
iis7站长之家
java里面switch()里面的变量只能是int吗?
来源: 互联网 发布时间:2015-02-21
本文导语: 我的下面这段程序就不对! String requestname = ""; if(request.getParameter("requestname")!=null) requestname = request.getParameter("requestname"); switch(requestname) { case "getMaterilList": getMaterilList(req...
我的下面这段程序就不对!
String requestname = "";
if(request.getParameter("requestname")!=null)
requestname = request.getParameter("requestname");
switch(requestname)
{
case "getMaterilList": getMaterilList(request,response);
break;
case "submitText": submitText(request,response);
break;
}
String requestname = "";
if(request.getParameter("requestname")!=null)
requestname = request.getParameter("requestname");
switch(requestname)
{
case "getMaterilList": getMaterilList(request,response);
break;
case "submitText": submitText(request,response);
break;
}
|
只有基本类型才可以
boolean
byte
char
int
boolean
byte
char
int