THE PACKAGE JAVA.LANG
java.lang.Long
20.8
20.8.16
public static String toBinaryString(long i)
The argument is converted to an unsigned representation in binary radix (base 2);
this representation is returned as a string.
The result represents the unsigned magnitude of the argument. This equals the
argument plus 2
64
if the argument is negative; otherwise, it equals the argument.
If the unsigned magnitude is zero, it is represented by a single zero character
0
(
\u0030
); otherwise, the first character of the representation of the
unsigned magnitude will not be the zero character. The characters
0
(
\u0030
) and
1
(
\u0031
) are used as binary digits.
20.8.17
public static long parseLong(String s)
throws NumberFormatException
The argument is interpreted as representing a signed decimal integer. The compo
nents of the string must all be decimal digits, except that the first character may be
(
\u002d
) to indicate a negative value. The resulting
long
value is returned,
exactly as if the argument and the radix
10
were given as arguments to the
parseLong
method that takes two arguments ( 20.8.18).
Note that neither
L
nor
l
is permitted to appear at the end of the string as a
type indicator, as would be permitted in Java source code ( 3.10.1).
20.8.18
public static long parseLong(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. The components of the string must all be digits of
the specified radix (as determined by whether
Character.digit
( 20.5.23)
returns a nonnegative value), except that the first character may be
(
\u002d
) to indicate a negative value. The resulting
long
value is returned.
Note that neither
L
nor
l
is permitted to appear at the end of the string as a
type indicator, as would be permitted in Java source code ( 3.10.1) except that
either
L
or
l
may appear as a digit for a radix greater than
22
.
An exception of type
NumberFormatException
is thrown if any of the fol
lowing situations occurs:
The first argument is
null
or is a string of length zero.
The
radix
is either smaller than
Character.MIN_RADIX
( 20.5.3) or larger
than
Character.MAX_RADIX
( 20.5.4).
499
footer
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