實例如下所示:
public static boolean isPureDigital(String string) { if (isBlank(string)) return false; String regEx1 = "//d+"; Pattern p; Matcher m; p = Pattern.compile(regEx1); m = p.matcher(string); if (m.matches()) return true; else return false; }
以上這篇java判斷字符串是正整數的實例就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持VeVb武林網。
新聞熱點
疑難解答
圖片精選