Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

check if string has a valid number java

private boolean isInt(String s){
        try{
            Integer.parseInt(s);
            return true;
        }catch (NumberFormatException e){
            return false;
        }
    }
 
PREVIOUS NEXT
Tagged: #check #string #valid #number #java
ADD COMMENT
Topic
Name
4+9 =