Discuss about a default constructor


Discuss the below:

An exception class called ChatIOException that extends from IOException that is imported from the java.io package in order to extend IOException. Also, the ChatIOException class is within the package name javatraining.example.multithreads.chat

There are 2 constructors that need to be declared for the ChatIOException class.

The first is a default constructor for the ChatIOException class. This constructor takes in no parameters and calls super() within the implementation block.

The second constructor takes in a string as a parameter and passes this string into the call to super();

 

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Discuss about a default constructor
Reference No:- TGS01935938

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)