Uses of Class
java.lang.NumberFormatException
-
Packages that use 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 and 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 and Description static Short
Short. decode(String nm)
Decodes aString
into aShort
.static Byte
Byte. decode(String nm)
Decodes aString
into aByte
.static Long
Long. decode(String nm)
Decodes aString
into aLong
.static Integer
Integer. decode(String nm)
Decodes aString
into anInteger
.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(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(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(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(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 Float
Float. valueOf(String s)
Returns aFloat
object holding thefloat
value represented by the argument strings
.static Short
Short. valueOf(String s)
Returns aShort
object holding the value given by the specifiedString
.static Byte
Byte. valueOf(String s)
Returns aByte
object holding the value given by the specifiedString
.static Double
Double. valueOf(String s)
Returns aDouble
object holding thedouble
value represented by the argument strings
.static Long
Long. valueOf(String s)
Returns aLong
object holding the value of the specifiedString
.static Integer
Integer. valueOf(String s)
Returns anInteger
object holding the value of 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.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 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 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.Constructors in java.lang that throw NumberFormatException Constructor and Description Byte(String s)
Constructs a newly allocatedByte
object that represents thebyte
value indicated by theString
parameter.Double(String s)
Constructs a newly allocatedDouble
object that represents the floating-point value of typedouble
represented by the string.Float(String s)
Constructs a newly allocatedFloat
object that represents the floating-point value of typefloat
represented by the string.Integer(String s)
Constructs a newly allocatedInteger
object that represents theint
value indicated by theString
parameter.Long(String s)
Constructs a newly allocatedLong
object that represents thelong
value indicated by theString
parameter.Short(String s)
Constructs a newly allocatedShort
object that represents theshort
value indicated by theString
parameter.
-
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.