首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

字符串比较的有关问题

2013-04-20 
字符串比较的问题sParam s + escape(f.Opt_Efa_SelectByAn.value)sParam +&typ+escape(tru)

字符串比较的问题

sParam = "s=" + escape(f.Opt_Efa_SelectByAn.value);
sParam +="&typ="+escape("tru");
 参数 执行java代理
 String typ = getUrlQueryString(sRequest_Content,"typ");
                 typ=unescape (typ);
               typ=typ.trim();
pw.println((sType=="tru")+sType); 
打印出来的结果 falsetru

 sType=="tru" 有问题么。。不是该true么。。。。 Java String
[解决办法]
字符串比较请用equals方法...这样的等于是比较地址.

热点排行