ProAnswers.org

What happens if a string like “ Hello” is passed to parseInt ( ) method ?

Ideally a string with an integer value should be passed to parseInt ( ) method. So, on parsing “Hello”, an exception called “NumberFormatException’ occurs since the parseInt( ) method cannot convert the given string “Hello” into an integer value.