📄 javautil.doc12.html
字号:
<html>
<head>
<title>The Java Language Specification The Package java.util</title>
</head>
<body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000>
<a href="index.html">Contents</a> | <a href="javautil.doc11.html">Prev</a> | <a href="javaio.doc.html">Next</a> | <a href="j.index.doc1.html">Index</a>
<hr><br>
<a name="23170"></a>
<center><h1>21.14 The Class <code>java.util.NoSuchElementException</code></h1></center>
<a name="23171"></a>
A <code>NoSuchElementException</code> is thrown to indicate that another element was
requested from an <code>Enumeration</code> object that has no more elements to supply. See
method <code>nextElement</code> of interface <code>Enumeration</code> <a href="javautil.doc.html#23156">(§21.1.2)</a>.
<p><pre><a name="23175"></a>public class <code><b>NoSuchElementException</b></code> extends RuntimeException {
<a name="23176"></a> public <code><b>NoSuchElementException</b></code>();
<a name="23177"></a> public <code><b>NoSuchElementException</b></code>(String s);
<a name="23178"></a>}
</pre><a name="23179"></a>
<p><font size=+1><strong>21.14.1 </strong> <code>public <code><b>NoSuchElementException</b></code>()</code></font>
<p>
<a name="23180"></a>
This constructor initializes a newly created <code>NoSuchElementException</code> with
<code>null</code> as its error message string.
<p><a name="23181"></a>
<p><font size=+1><strong>21.14.2 </strong> <code>public <code><b>NoSuchElementException</b></code>(String s)</code></font>
<p>
<a name="23182"></a>
This constructor initializes a newly created <code>NoSuchElementException</code> by saving
a reference to the error message string <code>s</code> for later retrieval by the <code>getMessage</code>
method <a href="javalang.doc20.html#3275">(§20.22.3)</a>.
<p>
<hr>
<!-- This inserts footnotes--><p>
<a href="index.html">Contents</a> | <a href="javautil.doc11.html">Prev</a> | <a href="javaio.doc.html">Next</a> | <a href="j.index.doc1.html">Index</a>
<p>
<font size=-1>Java Language Specification (HTML generated by Suzette Pelouch on February 24, 1998)<br>
<i><a href="jcopyright.doc.html">Copyright © 1996 Sun Microsystems, Inc.</a>
All rights reserved</i>
<br>
Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a>
</font>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -