All About Class NoSuchElementException in Java

This exception is thrown by mostly nextElement() method of an enumeration to indicate that there are no more elements in the Enumeration.

public class java.util.NoSuchElementException extends
             java.lang.RuntimeException{
//constructors
public NoSuchElementException();
//default constructor and constructs a NoSuchElementException with no details message.

public NoSuchElementException(String message);
//constructs a NoSuchElementException with the message passed in the argument
}
 
All About Class NoSuchElementException in Java All About Class NoSuchElementException in Java Reviewed by Animesh Chatterjee on September 14, 2018 Rating: 5

No comments:

Powered by Blogger.