码迷,mamicode.com
首页 > 编程语言 > 详细

java判断不为空

时间:2015-01-30 19:11:55      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:

因为java是强类型语言,所以判断空的时候分null 和字符串空

if(userID == null || "".equals(userID)){
		 response.sendRedirect("login.jsp?errorType="+Utility.encrypt("1")+"&userID="+userID);
		 return;
	 }

 

java判断不为空

标签:

原文地址:http://www.cnblogs.com/sunxun/p/4262856.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!