21.14 The Class java.util.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 (§21.1.2).

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

21.14.1 public NoSuchElementException()

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

21.14.2 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 (§20.22.3).