try
{
number=Integer.parseInt(str);
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
catch (IllegalArgumentException e)
{
System.out.println("Bad number format.");
}
catch (NumberFormatException e)
{
System.out.println(str + " is not a number.");
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.