Here you can find the source of isInteger(String input)
public static boolean isInteger(String input)
//package com.java2s; public class Main { public static boolean isInteger(String input) { try {/*from w w w. ja v a2s . c om*/ Integer.parseInt(input); return true; } catch (Exception e) { return false; } } }