Here you can find the source of isNum(String s)
public static boolean isNum(String s)
//package com.java2s; public class Main { public static boolean isNum(String s) { try {/*from w ww .j a va2 s. co m*/ Integer.parseInt(s); } catch (NumberFormatException nfe) { return false; } return true; } }