The problem is that Exception block is never reach ..
If you want to print that you can do like this
In your previous code,the catch exception is in the other method but as soon as the statement
Integer iv=new Integer(args[0]);
is reached it throws an Exception in the main class..it do not go to the method that you are using
so thats why its was not printing wat you want...
Better way is
You can do all you checking in the main class then call you method test if everything is ok. Anyway this is just an opinion of mine ...
[ July 17, 2007: Message edited by: vanlalhmangaiha khiangte ]