Re: plz can anyone help me(urgently required) how to get an integer from a text field
Wednesday, June 27, 2007 12:05 PM
Is there a whitespace before the 2? watch for that... Also, in order to be able to handle any such condition, do two things..
1. Do a validation before calling the Integer.parseInt() method
2. Just as a what-if case, surround the parseInt with a try catch and handle the exception...
Otherwise there is no reason I see why the code should fail...