Here you can find the source of isNumber(String str)
public static Boolean isNumber(String str)
//package com.java2s; public class Main { public static Boolean isNumber(String str) { Boolean isNumber = false; String expr = "^[0-9]+$"; if (str.matches(expr)) { isNumber = true;/*w w w.j a va2 s . c o m*/ } return isNumber; } }