Java check if string is possible parsing in integer

https://w‮uttual.ww‬ri.com
Java check if string is possible parsing in integer
public boolean isInteger(String string) {
    try {
        Integer.valueOf(string);
        // Integer.parse(string);
        return true;
    } catch (NumberFormatException e) {
        return false;
    }
}
Created Time:2017-09-10 09:59:49  Author:lautturi