Uses of Class
java.lang.NumberFormatException
Package | Description |
---|---|
java.awt |
Contains all of the classes for creating user interfaces and for painting
graphics and images.
|
java.lang |
Provides classes that are fundamental to the design of the Java
programming language.
|
-
Uses of NumberFormatException in java.awt
Methods in java.awt that throw NumberFormatException Modifier and Type Method Description static Color
Color. decode(String nm)
Converts aString
to an integer and returns the specified opaqueColor
. -
Uses of NumberFormatException in java.lang
Methods in java.lang that throw NumberFormatException Modifier and Type Method Description static Byte
Byte. decode(String nm)
Decodes aString
into aByte
.static Integer
Integer. decode(String nm)
Decodes aString
into anInteger
.static Long
Long. decode(String nm)
Decodes aString
into aLong
.static Short
Short. decode(String nm)
Decodes aString
into aShort
.boolean
Package. isCompatibleWith(String desired)
Compare this package's specification version with a desired version.static byte
Byte. parseByte(String s)
Parses the string argument as a signed decimalbyte
.static byte
Byte. parseByte(String s, int radix)
Parses the string argument as a signedbyte
in the radix specified by the second argument.static double
Double. parseDouble(String s)
Returns a newdouble
initialized to the value represented by the specifiedString
, as performed by thevalueOf
method of classDouble
.static float
Float. parseFloat(String s)
Returns a newfloat
initialized to the value represented by the specifiedString
, as performed by thevalueOf
method of classFloat
.static int
Integer. parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as a signedint
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.static int
Integer. parseInt(String s)
Parses the string argument as a signed decimal integer.static int
Integer. parseInt(String s, int radix)
Parses the string argument as a signed integer in the radix specified by the second argument.static long
Long. parseLong(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as a signedlong
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.static long
Long. parseLong(String s)
Parses the string argument as a signed decimallong
.static long
Long. parseLong(String s, int radix)
Parses the string argument as a signedlong
in the radix specified by the second argument.static short
Short. parseShort(String s)
Parses the string argument as a signed decimalshort
.static short
Short. parseShort(String s, int radix)
Parses the string argument as a signedshort
in the radix specified by the second argument.static int
Integer. parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as an unsignedint
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.static int
Integer. parseUnsignedInt(String s)
Parses the string argument as an unsigned decimal integer.static int
Integer. parseUnsignedInt(String s, int radix)
Parses the string argument as an unsigned integer in the radix specified by the second argument.static long
Long. parseUnsignedLong(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as an unsignedlong
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.static long
Long. parseUnsignedLong(String s)
Parses the string argument as an unsigned decimallong
.static long
Long. parseUnsignedLong(String s, int radix)
Parses the string argument as an unsignedlong
in the radix specified by the second argument.static Byte
Byte. valueOf(String s)
Returns aByte
object holding the value given by the specifiedString
.static Byte
Byte. valueOf(String s, int radix)
Returns aByte
object holding the value extracted from the specifiedString
when parsed with the radix given by the second argument.static Double
Double. valueOf(String s)
Returns aDouble
object holding thedouble
value represented by the argument strings
.static Float
Float. valueOf(String s)
Returns aFloat
object holding thefloat
value represented by the argument strings
.static Integer
Integer. valueOf(String s)
Returns anInteger
object holding the value of the specifiedString
.static Integer
Integer. valueOf(String s, int radix)
Returns anInteger
object holding the value extracted from the specifiedString
when parsed with the radix given by the second argument.static Long
Long. valueOf(String s)
Returns aLong
object holding the value of the specifiedString
.static Long
Long. valueOf(String s, int radix)
Returns aLong
object holding the value extracted from the specifiedString
when parsed with the radix given by the second argument.static Short
Short. valueOf(String s)
Returns aShort
object holding the value given by the specifiedString
.static Short
Short. valueOf(String s, int radix)
Returns aShort
object holding the value extracted from the specifiedString
when parsed with the radix given by the second argument.Constructors in java.lang that throw NumberFormatException Constructor Description Byte(String s)
Deprecated.It is rarely appropriate to use this constructor.Double(String s)
Deprecated.It is rarely appropriate to use this constructor.Float(String s)
Deprecated.It is rarely appropriate to use this constructor.Integer(String s)
Deprecated.It is rarely appropriate to use this constructor.Long(String s)
Deprecated.It is rarely appropriate to use this constructor.Short(String s)
Deprecated.It is rarely appropriate to use this constructor.