推断数据是否为整数

public  class IsInteger {

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

	
}

原文地址:https://www.cnblogs.com/wgwyanfs/p/6895056.html