⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 float.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#isNaN()">isNaN</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this <code>Float</code> value is Not-a-Number (NaN).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#isNaN(float)">isNaN</A></B>(float&nbsp;v)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the specified number is the special Not-a-Number (NaN) value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#longValue()">longValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the long value of this Float (by casting to a long).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#parseFloat(java.lang.String)">parseFloat</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new float initialized to the value represented by the  specified <code>String</code>, as performed by the <code>valueOf</code> method of class <code>Double</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#shortValue()">shortValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this Float as a short (by casting to a short).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a String representation of this Float object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#toString(float)">toString</A></B>(float&nbsp;f)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a String representation for the specified float value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/lang/Float.html">Float</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/Float.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the floating point value represented by the specified String.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="POSITIVE_INFINITY"><!-- --></A><H3>POSITIVE_INFINITY</H3><PRE>public static final float <B>POSITIVE_INFINITY</B></PRE><DL><DD>The positive infinity of type <code>float</code>. It is equal  to the value returned by <code>Float.intBitsToFloat(0x7f800000)</code>.</DL><HR><A NAME="NEGATIVE_INFINITY"><!-- --></A><H3>NEGATIVE_INFINITY</H3><PRE>public static final float <B>NEGATIVE_INFINITY</B></PRE><DL><DD>The negative infinity of type <code>float</code>. It is equal  to the value returned by <code>Float.intBitsToFloat(0xff800000)</code>.</DL><HR><A NAME="NaN"><!-- --></A><H3>NaN</H3><PRE>public static final float <B>NaN</B></PRE><DL><DD>The Not-a-Number (NaN) value of type <code>float</code>.  It is equal to the value returned by <code>Float.intBitsToFloat(0x7fc00000)</code>.</DL><HR><A NAME="MAX_VALUE"><!-- --></A><H3>MAX_VALUE</H3><PRE>public static final float <B>MAX_VALUE</B></PRE><DL><DD>The largest positive value of type <code>float</code>. It is  equal to the value returned by  <code>Float.intBitsToFloat(0x7f7fffff)</code>.</DL><HR><A NAME="MIN_VALUE"><!-- --></A><H3>MIN_VALUE</H3><PRE>public static final float <B>MIN_VALUE</B></PRE><DL><DD>The smallest positive value of type <code>float</code>. It  is equal to the value returned by  <code>Float.intBitsToFloat(0x1)</code>.</DL><HR><A NAME="TYPE"><!-- --></A><H3>TYPE</H3><PRE>public static final <A HREF="../../java/lang/Class.html">Class</A> <B>TYPE</B></PRE><DL><DD>The Class object representing the primitive type float.<DD><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Float(float)"><!-- --></A><H3>Float</H3><PRE>public <B>Float</B>(float&nbsp;value)</PRE><DL><DD>Constructs a newly allocated <code>Float</code> object that represents the primitive <code>float</code> argument.<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to be represented by the <code>Float</code>.</DL></DD></DL><HR><A NAME="Float(double)"><!-- --></A><H3>Float</H3><PRE>public <B>Float</B>(double&nbsp;value)</PRE><DL><DD>Constructs a newly allocated <code>Float</code>object that represents the argument converted to type <code>float</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to be represented by the <code>Float</code>.</DL></DD></DL><HR><A NAME="Float(java.lang.String)"><!-- --></A><H3>Float</H3><PRE>public <B>Float</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;s)      throws <A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></PRE><DL><DD>Constructs a newly allocated <code>Float</code> object that  represents the floating-point value of type <code>float</code>  represented by the string. The string is converted to a  <code>float</code> value as if by the <code>valueOf</code> method.<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - a string to be converted to a <code>Float</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></CODE> - if the string does not contain a               parsable number.<DT><B>See Also: </B><DD><A HREF="../../java/lang/Float.html#valueOf(java.lang.String)"><CODE>valueOf(java.lang.String)</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="toString(float)"><!-- --></A><H3>toString</H3><PRE>public static <A HREF="../../java/lang/String.html">String</A> <B>toString</B>(float&nbsp;f)</PRE><DL><DD>Returns a String representation for the specified float value. The argument is converted to a readable string format as follows.  All characters and characters in strings mentioned below are ASCII  characters.  <ul> <li>If the argument is NaN, the result is the string <tt>"NaN"</tt>.  <li>Otherwise, the result is a string that represents the sign and      magnitude (absolute value) of the argument. If the sign is      negative, the first character of the result is <tt>'-'</tt>      (<tt>'-'</tt>); if the sign is positive, no sign character     appears in the result. As for the magnitude <var>m</var>:  <ul> <li>If <var>m</var> is infinity, it is represented by the characters      <tt>"Infinity"</tt>; thus, positive infinity produces the result      <tt>"Infinity"</tt> and negative infinity produces the result      <tt>"-Infinity"</tt>.  <li>If <var>m</var> is zero, it is represented by the characters      <tt>"0.0"</tt>; thus, negative zero produces the result      <tt>"-0.0"</tt> and positive zero produces the result      <tt>"0.0"</tt>.  <li> If <var>m</var> is greater than or equal to 10<sup>-3</sup> but       less than 10<sup>7</sup>, then it is represented as the integer       part of <var>m</var>, in decimal form with no leading zeroes,       followed by <tt>'.'</tt> (<tt>.</tt>), followed by one or       more decimal digits representing the fractional part of       <var>m</var>.  <li> If <var>m</var> is less than 10<sup>-3</sup or not less than       10<sup>7</sup>, then it is represented in so-called "computerized       scientific notation." Let <var>n</var> be the unique integer       such that 10<sup>n</sup>&lt;=<var>m</var>&lt;1; then let       <var>a</var> be the mathematically exact quotient of <var>m</var>       and 10<sup>n</sup> so that 1&lt;<var>a</var>&lt10. The magnitude       is then represented as the integer part of <var>a</var>, as a       single decimal digit, followed by <tt>'.'</tt> (<tt>.</tt>),       followed by decimal digits representing the fractional part of       <var>a</var>, followed by the letter <tt>'E'</tt>       (<tt>E</tt>), followed by a representation of <var>n</var>       as a decimal integer, as produced by the method      <tt><A HREF="../../java/lang/Integer.html#toString(int)"><CODE>Integer.toString(int)</CODE></A></tt> of one argument.  </ul> How many digits must be printed for the fractional part of  <var>m</var> or <var>a</var>? There must be at least one digit to  represent the fractional part, and beyond that as many, but only as  many, more digits as are needed to uniquely distinguish the argument value from adjacent values of type float. That is, suppose that  <var>x</var> is the exact mathematical value represented by the  decimal representation produced by this method for a finite nonzero  argument <var>f</var>. Then <var>f</var> must be the float value  nearest to <var>x</var>; or, if two float values are equally close to  <var>x</var>then <var>f</var> must be one of them and the least  significant bit of the significand of <var>f</var> must be <tt>0</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>f</CODE> - the float to be converted.<DT><B>Returns:</B><DD>a string representation of the argument.</DL></DD></DL><HR><A NAME="valueOf(java.lang.String)"><!-- --></A><H3>valueOf</H3><PRE>public static <A HREF="../../java/lang/Float.html">Float</A> <B>valueOf</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;s)                     throws <A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></PRE><DL><DD>Returns the floating point value represented by the specified String.  The string <code>s</code> is interpreted as the representation of a  floating-point value and a <code>Float</code> object representing that  value is created and returned.  <p> If <code>s</code> is <code>null</code>, then a  <code>NullPointerException</code> is thrown.  <p> Leading and trailing whitespace characters in s are ignored. The rest  of <code>s</code> should constitute a <i>FloatValue</i> as described  by the lexical syntax rules: <blockquote><pre><i> FloatValue:           Sign<sub>opt</sub> FloatingPointLiteral </i></pre></blockquote>     	  where <i>Sign</i>, <i>FloatingPointLiteral</i> are as defined in  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -