CHAPTER 21: The Package java.util Previous
Previous
Java Language
Java Language
Index
Index
Next
Next

21.14 The Class java.util.NoSuchElementException

21.14.1 NoSuchElementException , 21.14.2 NoSuchElementException

A NoSuchElementException is thrown to indicate that another element was requested from an Enumeration object that has no more elements to supply. See method nextElement of interface Enumeration (S21.1.2).

public class NoSuchElementException extends RuntimeException {
	public NoSuchElementException();
	public NoSuchElementException(String s);
}


21.14.1 NoSuchElementException

public NoSuchElementException()

This constructor initializes a newly created NoSuchElementException with null as its error message string.


21.14.2 NoSuchElementException

public NoSuchElementException(String s)

This constructor initializes a newly created NoSuchElementException by saving a reference to the error message string s for later retrieval by the getMessage method (S20.22.3).

© 1996 Sun Microsystems, Inc. All rights reserved.