Spread the love

Class NotActiveException in Java

Spread the love

Class NotActiveException in Java

An application can throw NotActiveException if it invokes a method either the method never invoked at the right time or the method is invoked in a wrong context.
A NotActiveException is also thrown to indicate that an inappropriate method is being called when serialization or deserialization is not in progress.
If an ObjectInputStream or ObjectOutputStream is not currently active, the operations on one of these could not be performed.
NotActiveException is a subclass of ObjectStreamException and is common exception classes in java.

The structure of NotActiveException class is given as:

public class java.io.NotActiveException extends java.io.ObjectStreamException{
public NotActiveException();//default constructor
public NotActiveException(String message);

The details of the methods are described as:

public NotActiveException();//default constructor

public NotActiveException() is a default constructor.This constructor creates a NotActiveException with no detail message

public NotActiveException(String message);

public NotActiveException(String message) is another constructor that creates a NotActiveException with the specified detail message.
message-The detail message.
The class NotActiveException also inherits methods from class Object and Throwable.

From Object classFrom Throwable class
wait(long, int)getLocalizedMessage()

Spread the love
READ  SequentialInputStream in Java
READ  Class CollationKey in Java
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Learn How to Use Jacoco Java code Coverage

Introduction to Jacoco Jacoco provides a wide range of coverage(analysis of instructions,...



Please enter your comment!
Please enter your name here

Recent Posts

Learn Quickly About DevOps Tools in a Fast and Efficient Manner

Introduction to DevOps tools DevOps tools are a collection of...

How to Collaborate between Development and Operations Team Fast and Effectively

Collaborate between Development and Operations Teams are the key...

Learn How to Use Jacoco Java code Coverage

Introduction to Jacoco Jacoco provides a wide range of coverage(analysis...


Spread the love