推断数据是否为整数

public  class IsInteger {

	private IsInteger(){};
	
	public static boolean isInteger(String value) {   
	     try {   
	         Integer.parseInt(value);   
	         return true;   
	     } catch (NumberFormatException e) {   
	         return false;   
	     }   
	 }   

	
}

posted on 2017-05-23 17:22  wgwyanfs  阅读(83)  评论(0编辑  收藏  举报

导航