:P The performance difference here is negligible. However, yes. Exceptions are generally bad practice (like goto's, though exceptions are slightly more useful and not quite as bad programming...
Type: Posts; User: helloworld922
:P The performance difference here is negligible. However, yes. Exceptions are generally bad practice (like goto's, though exceptions are slightly more useful and not quite as bad programming...
... If you want to check for a negative number, just use parseInt(), and catch the exception.
try
{
if (Integer.parseInt(someStr) < 0)
{
...