Computer Science, asked by 7991159100s, 1 month ago

QUESTION:-

When do numeric wrapper class constructor raise NumberFormatException?​

Answers

Answered by IceWeb
5

Answer-:

The NumberFormatException is thrown when we try to convert a string into a numeric value such as float or integer, but the format of the input string is not appropriate or illegal. By illegal format, it is meant that if you are trying to parse a string to an integer but the String contains a boolean value, it is of illegal format.

For example - if we try to parse a string to integer but the string is null.

It is an unchecked exception.

Similar questions