THE PACKAGE JAVA.LANG
java.lang.Float
20.9
method for a finite nonzero argument
f
. Then
f
 must be the
float
 value nearest
to
x
; or, if two
float
 values are equally close to
x
, then
f
 must be one of them and
the least significant bit of the significand of
f
 must be
0
.
[This specification for the method
toString
 is scheduled for introduction in
Java version 1.1. In previous versions of Java, this method produces
Inf
 instead of
Infinity
 for infinite values. Also, it renders finite values in the same form as the
%g
 format of the
printf
 function in the C programming language, which can lose
precision because it produces at most six digits after the decimal point.]
20.9.17
public static Float valueOf(String s)
throws NullPointerException, NumberFormatException
The string
s
 is interpreted as the representation of a floating point value and a
Float
 object representing that value is created and returned.
If
s
 is
null
, then a
NullPointerException
 is thrown.
Leading and trailing whitespace ( 20.5.19) characters in
s
 are ignored. The
rest of
s
 should constitute a
FloatValue
 as described by the lexical syntax rules:
FloatValue:
Sign
opt
Digits
 .
Digits
opt
ExponentPart
opt
Sign
opt
.
Digits ExponentPart
opt
where
Sign
,
Digits
, and
ExponentPart
 are as defined in  3.10.2. If it does not have
the form of a
FloatValue
, then a
NumberFormatException
 is thrown. Otherwise,
it is regarded as representing an exact decimal value in the usual  computerized
scientific notation ; this exact decimal value is then conceptually converted to an
 infinitely precise  binary value that is then rounded to type
float
 by the usual
round to nearest rule of IEEE 754 floating point arithmetic. Finally, a new object
of class
Float
 is created to represent this
float
 value.
Note that neither
F
 nor
f
 is permitted to appear in
s
 as a type indicator, as
would be permitted in Java source code ( 3.10.1).
20.9.18
public boolean isNaN()
The result is
true
 if and only if the value represented by this
Float
 object is
NaN.
20.9.19
public static boolean isNaN(float v)
The result is
true
 if and only if the value of the argument is NaN.
507






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