public static boolean isLong ( String s ) { if ( s == null ) { return false ; } try { Long . parseLong ( s . trim ( ) ) ; } catch ( NumberFormatException e ) { return false ; } return true ; }
Validate if the given string is a long