String str="123"
boolean result=str.matches("[0-9]+$")
System.out.println(result)
if (x instanceof Integer || x instanceof Long) {//是整数
}else {
//不是整数
}
String str="123"
boolean result=str.matches("[0-9]+$")
System.out.println(result)
if (x instanceof Integer || x instanceof Long) {//是整数
}else {
//不是整数
}