Java 判断是否是数字

xiaoxiao2025-04-09  17

int id = 12345689797; Pattern pattern = Pattern.compile("[0-9]*"); Matcher isNum = pattern.matcher(id); if( !isNum.matches() ){ //不是数字 }else{ //是数字 }
转载请注明原文地址: https://www.6miu.com/read-5027871.html

最新回复(0)