Here you can find the source of isInt(final String chaineToTest)
Parameter | Description |
---|---|
chaineToTest | a parameter |
public static boolean isInt(final String chaineToTest)
//package com.java2s; public class Main { /**//w ww. j a v a 2s .com * @param chaineToTest * @return check if string is int format */ public static boolean isInt(final String chaineToTest) { try { Integer.parseInt(chaineToTest); return true; } catch (final Exception e) { return false; } } }