Thursday, February 5, 2009

Is Number Function.

This function is to check whether the given parameter is number or not...



public static boolean isNumber(String str){
boolean number=false;
try{
Integer.parseInt(str);
number=true;
}catch(NumberFormatException n){
number=false;
}
return number;
}

No comments: