public boolean containsOnlyNumbers(String str)
{
System.out.println(" into validate numbers ");
if (str.length() == 0) {
return false;
}
for (int i = 0; i < str.length(); i++) {
if (!Character.isDigit(str.charAt(i)))
{
System.out.println(str + " not a number ");
return false;
}
}
System.out.println(str + " number only");
return true;
}