If the numbers are always in the format of number space number then you could do something like this
import java.util.regex.Pattern;
...
static boolean MatchNumbers(String input){
return Pattern.matches("\d*\s\d*\s\d*", input);
}
EDIT: I Just read a previous post of yours and it turns out that Pattern matching is above your supposed level...what a lie
anyways, Solution mark II from me.
static boolean MatchNumbers(String input){
for(num : input.split(" ")){
try{
Integer.parseInt(num);
}catch(NumberFormatException nfe){ return false; }
}
return true;
}
Regards,
Chris