So basically this is my method but when for isIntger but when I call I try it, it compiles but nothing gets printed out, why?
private static boolean isInteger(String s) {
if(s.matches("[0-9]")){
return true;}
else{
return false;
}
}
public static void main(String[] args) {
isInteger("2");
}
