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) { try {/* www . j a va2 s . c o m*/ Integer.parseInt(str); return true; } catch (Exception e) { return false; } } }