1. Java.lang class Integer
Method: public static int parseint(String s)
Description: Parses the string argument as a signed decimal integer. The characters in a string must be decimal digits except that the first character can be used to represent a negative ASCII minus '-' (' \u002d '). Returns the resulting integer value as if the argument and cardinality 10 were given the public static int parseint (java.lang.String, int) method as a parameter.
Parameter: S-String that contains the int representation to resolve.
Returns the integer value represented by a decimal parameter.
Method: public static int parseint(String s, int radix)
Throws NumberFormatException
Description: Resolves a string parameter to a signed integer using the cardinality specified by the second parameter. Except that the first character can be used to represent a negative ASCII minus '-' (' \u002d '), the characters in the string must all be numbers of the specified cardinality. Returns the resulting integer value.
If any of the following occurs, a NumberFormatException type exception is thrown: The first argument is null or a string of zero length. Cardinality is less than Character.min_radix or greater than Character.max_radix. If the string is longer than 1, then there is any character in the string that is not represented by a number in the specified cardinality, except that the first character can be a minus sign '-' (' u002d '). The value represented by a string is not a value of type int.
Parameter: S-a String that contains the integer representation to parse; radix-the cardinality used when parsing s
Returns: An integer represented by a string parameter of the specified cardinality.
Example:
parseint ("0", 10)//Return 0
parseint ("473", 10)//Return 473
parseint ("-0", 10)//Return 0
parseint ("-ff", 16)//Return -255< C3/>parseint ("1100110", 2)//Return 102
parseint ("2147483647", 10)//Return 2147483647
parseint ("-2147483648", 10)// return -2147483648
parseint ("2147483648", 10)//Throw numberformatexception
parseint ("99", 8)//Throw NumberFormatException
parseint ("Kona", 10)//Throw numberformatexception
parseint ("Kona", 27)//Return 411787