Hello basically I tried to use this code
for(int character=0; character<roomNo.length(); character++){
if((Character.isDigit(roomNo.charAt(character)))) {
}
}
return true;
To loop through a String and see if it contains any numbers. I'm trying to create a method that checks whether a String is numeric, if it is the method should return true. So far it doesn't work? Any help would be appreciated :)
-2.3to be a numeric value? Do you mean a strictly positive integer?