20.8
java.lang.Long
THE PACKAGE JAVA.LANG
The first character of the string is not a digit of the specified
radix
 and is not
a minus sign
   
 (
 \u002d 
).
The first character of the string is a minus sign and the string is of length 1.
Any character of the string after the first is not a digit of the specified
radix
.
The integer value represented by the string cannot be represented as a value of
type
long
.
Examples:
parseLong("0", 10)
 returns
0L
parseLong("473", 10)
 returns
473L
parseLong(" 0", 10)
 returns
0L
parseLong(" FF", 16)
 returns
 255L
parseLong("1100110", 2)
 returns
102L
parseLong("99", 8)
 throws a
NumberFormatException
parseLong("Hazelnut", 10)
 throws a
NumberFormatException
parseLong("Hazelnut", 36)
 returns
1356099454469L
20.8.19
public static Long valueOf(String s)
throws NumberFormatException
The argument is interpreted as representing a signed decimal integer, exactly as if
the argument were given to the
parseLong
 method that takes one argument
( 20.8.17). The result is a
Long
 object that represents the integer value specified
by the string.
In other words, this method returns a
Long
 object equal to the value of:
new Long(Long.parseLong(s))
20.8.20
public static Long valueOf(String s, int radix)
throws NumberFormatException
The first argument is interpreted as representing a signed integer in the radix spec 
ified by the second argument, exactly as if the arguments were given to the
parseLong
 method that takes two arguments ( 20.8.18). The result is a
Long
object that represents the integer value specified by the string.
In other words, this method returns a
Long
 object equal to the value of:
new Long(Long.parseLong(s, radix))
500






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved