判断是否是数字

	/** 判断是否为数字
	 * **/
	Boolean paramIsNumber(String str){
		boolean bResult = false;
		if(str !=null &&  !"".equals(str.trim())){
			Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
			bResult = pattern.matcher(str).matches();
		}
		return bResult;
	}

https://www.cnblogs.com/feisuanyz/p/17720408.html

posted @ 2025-02-20 13:42  寒冷的雨呢  阅读(7)  评论(0)    收藏  举报