APIdia Launch Partner
Top Description Fields Constructors Methods
java.lang

public Class NumberFormatException

extends IllegalArgumentException
Class Inheritance

Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
Since
1.0
See Also
java.lang.Integer#parseInt(String)

Field Summary

Modifier and TypeField and Description
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
NumberFormatException()

Constructs a NumberFormatException with no detail message.

public
NumberFormatException(String
the detail message.
s
)

Constructs a NumberFormatException with the specified detail message.

Method Summary

Modifier and TypeMethod and Description
pack-priv static NumberFormatException
forCharSequence(CharSequence
the input causing the error
s
,
int
the beginning index, inclusive.
beginIndex
,
int
the ending index, exclusive.
endIndex
,
int
the index of the first error in s
errorIndex
)

Factory method for making a NumberFormatException given the specified input which caused the error.

pack-priv static NumberFormatException
forInputString(String
the input causing the error
s
,
int radix)

Factory method for making a NumberFormatException given the specified input which caused the error.

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.lang.IllegalArgumentException.serialVersionUID.

Annotations
@Serial

Constructor Detail

NumberFormatExceptionback to summary
public NumberFormatException()

Constructs a NumberFormatException with no detail message.

NumberFormatExceptionback to summary
public NumberFormatException(String s)

Constructs a NumberFormatException with the specified detail message.

Parameters
s:String

the detail message.

Method Detail

forCharSequenceback to summary
pack-priv static NumberFormatException forCharSequence(CharSequence s, int beginIndex, int endIndex, int errorIndex)

Factory method for making a NumberFormatException given the specified input which caused the error.

Parameters
s:CharSequence

the input causing the error

beginIndex:int

the beginning index, inclusive.

endIndex:int

the ending index, exclusive.

errorIndex:int

the index of the first error in s

forInputStringback to summary
pack-priv static NumberFormatException forInputString(String s, int radix)

Factory method for making a NumberFormatException given the specified input which caused the error.

Parameters
s:String

the input causing the error