Here you can find the source of isInteger(String string)
public static boolean isInteger(String string)
//package com.java2s; public class Main { public static boolean isInteger(String string) { try {/*w w w. j av a 2s . com*/ Integer.parseInt(string); } catch (NumberFormatException e) { return false; } return true; } }