java 判断是否为数字格式
CreateTime--2017年12月1日10:37:00
Author:Marydon
java 判断是否为数字格式
/** * 判断是否为数字格式不限制位数 * @param o * 待校验参数 * @return * 如果全为数字,返回true;否则,返回false */ public static boolean isNumber(Object o){ return (Pattern.compile("[0-9]*")).matcher(String.valueOf(o)).matches(); }