if the passed object can be converted to an int, it will be converted. (ex. "1234"). Otherwise a NumberFormatException will be thrown.
Seetha Ram Janapala
May 22nd, 2006
Integer.parseInt() method throws a NumberFormatException if any data other than the number (within the range of java ?int? data type) is passed as argument, even when we pass spelled-out numbers, like "three".
What happens in Integer.parseInt() if the thing you pass isn't a number? And does it recognize spelled-out numbers, like "three" ?
Profile Answers by krishna_darl Questions by krishna_darl
Questions by krishna_darl answers by krishna_darl