Here you can find the source of isNumber(String str)
public static boolean isNumber(String str)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean isNumber(String str) { java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("[0-9]*"); java.util.regex.Matcher match = pattern.matcher(str); return match.matches(); // if (match.matches() == false) { // return false; // } ////ww w.java2 s .c om // return true; } }