numberformatexception.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 422 行 · 第 1/2 页

HTML
422
字号
          int&nbsp;radix)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将 string 参数分析为有符号的 <code>long</code>,基数由第二个参数指定。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;short</CODE></FONT></TD><TD><CODE><B>Short.</B><B><A HREF="../Short.html#parseShort(java.lang.String)">parseShort</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将字符串参数分析为有符号的十进制 <code>short</code>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;short</CODE></FONT></TD><TD><CODE><B>Short.</B><B><A HREF="../Short.html#parseShort(java.lang.String, int)">parseShort</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s,           int&nbsp;radix)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将字符串参数分析为由第二个参数指定的基数的有符号的 <code>short</code>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Float.html" title="java.lang 中的类">Float</A></CODE></FONT></TD><TD><CODE><B>Float.</B><B><A HREF="../Float.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回保存用参数字符串 <code>s</code> 表示的 <code>float</code> 值的 <code>Float</code> 对象。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Double.html" title="java.lang 中的类">Double</A></CODE></FONT></TD><TD><CODE><B>Double.</B><B><A HREF="../Double.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回保存用参数字符串 <code>s</code> 表示的 <code>double</code> 值的 <code>Double</code> 对象。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Byte.html" title="java.lang 中的类">Byte</A></CODE></FONT></TD><TD><CODE><B>Byte.</B><B><A HREF="../Byte.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个保存指定 <code>String</code> 所给出的值的 <code>Byte</code> 对象。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Short.html" title="java.lang 中的类">Short</A></CODE></FONT></TD><TD><CODE><B>Short.</B><B><A HREF="../Short.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个保存指定 <code>String</code> 所给出的值的 <code>Short</code> 对象。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Integer.html" title="java.lang 中的类">Integer</A></CODE></FONT></TD><TD><CODE><B>Integer.</B><B><A HREF="../Integer.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回保存指定的 <code>String</code> 的值的 <code>Integer</code> 对象。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Long.html" title="java.lang 中的类">Long</A></CODE></FONT></TD><TD><CODE><B>Long.</B><B><A HREF="../Long.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回保存指定 <code>String</code> 的值的 <code>Long</code> 对象。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Byte.html" title="java.lang 中的类">Byte</A></CODE></FONT></TD><TD><CODE><B>Byte.</B><B><A HREF="../Byte.html#valueOf(java.lang.String, int)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s,        int&nbsp;radix)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 <code>Byte</code> 对象,该对象保存从指定的 <code>String</code> 中提取的值,该值是在用第二个参数所给定的基数对指定字符串进行分析时提取的。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Short.html" title="java.lang 中的类">Short</A></CODE></FONT></TD><TD><CODE><B>Short.</B><B><A HREF="../Short.html#valueOf(java.lang.String, int)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s,        int&nbsp;radix)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 <code>Short</code> 对象,该对象保存从指定的 <code>String</code> 中提取的值,该值是在使用第二个参数给出的基数对指定字符串进行分析时提取的。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Integer.html" title="java.lang 中的类">Integer</A></CODE></FONT></TD><TD><CODE><B>Integer.</B><B><A HREF="../Integer.html#valueOf(java.lang.String, int)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s,        int&nbsp;radix)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 <code>Integer</code> 对象,该对象中保存了用第二个参数提供的基数进行分析时从指定的 <code>String</code> 中提取的值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Long.html" title="java.lang 中的类">Long</A></CODE></FONT></TD><TD><CODE><B>Long.</B><B><A HREF="../Long.html#valueOf(java.lang.String, int)">valueOf</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s,        int&nbsp;radix)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当使用第二个参数给出的基数进行分析时,返回保存从指定 <code>String</code> 中提取的值的 <code>Long</code> 对象。</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">抛出 <A HREF="../NumberFormatException.html" title="java.lang 中的类">NumberFormatException</A> 的 <A HREF="../package-summary.html">java.lang</A> 中的构造方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../Byte.html#Byte(java.lang.String)">Byte</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造一个新分配的 <code>Byte</code> 对象,以表示 <code>String</code> 参数所指示的 <code>byte</code> 值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../Double.html#Double(java.lang.String)">Double</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造一个新分配的 <code>Double</code> 对象,表示用字符串表示的 <code>double</code> 类型的浮点值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../Float.html#Float(java.lang.String)">Float</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造一个新分配的 <code>Float</code> 对象,它表示用字符串表示的 <code>float</code> 类型的浮点值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../Integer.html#Integer(java.lang.String)">Integer</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造一个新分配的 <code>Integer</code> 对象,它表示 <code>String</code> 参数所指示的 <code>int</code> 值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../Long.html#Long(java.lang.String)">Long</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造新分配的 <code>Long</code> 对象,表示由 <code>String</code> 参数指示的 <code>long</code> 值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../Short.html#Short(java.lang.String)">Short</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造一个新分配的 <code>Short</code> 对象,用来表示 <code>String</code> 参数所指示的 <code>short</code> 值。</TD></TR></TABLE>&nbsp;<P><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="跳过导航链接"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../NumberFormatException.html" title="java.lang 中的类"><FONT CLASS="NavBarFont1"><B>类</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>使用</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;上一个&nbsp;&nbsp;下一个</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html@java_2Flang_2F_2Fclass-useNumberFormatException.html" target="_top"><B>框架</B></A>  &nbsp;&nbsp;<A HREF="NumberFormatException.html" target="_top"><B>无框架</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>所有类</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="../../../../../../../../../java.sun.com/cgi-bin/bugreport.cgi">提交错误或意见</a><br>有关更多的 API 参考资料和开发人员文档,请参阅 <a href="../../../../../../../../../java.sun.com/j2se/1.5.0/docs/relnotes/devdocs-vs-specs.html">Java 2 SDK SE 开发人员文档</a>。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。 <p>版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守<a href="../../../../../../../../../java.sun.com/j2se/1.5.0/docs/relnotes/license.html">许可证条款</a>。另请参阅<a href="../../../../../../../../../java.sun.com/docs/redist.html">文档重新分发政策</a>。</font></BODY></HTML>

⌨️ 快捷键说明

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