Basic computer course, C programming language, Education, Engineering Course, Engineering Courses, Maths Coaching, online computer coaching, PGDCA course coaching, programming course, school computer coaching, training, Uncategorized, Web Design course

Custom Exception in Java – tccicomputercoaching.com

What is Exception?

Abnormal coding is called Exception.

We can use Try-Catch Block to handle Exception.

exception in java

There are two types of Exception handling.

1. Built in Exception

i.e. ArrayoutofboundException , ArithmaticException, FilenotFoundException

2. Custom Exception

Java provides us facility to create our own exceptions which are basically derived classes of Exception.

Here, MyExceptionClass has been extended from derived class of Exception.

Syntax:

Class <MyExceptionClass> extends Exception

{

//statements

}

Syntax:

throw new MyExceptionClass();

To learn more in detail about Exception Handling in Java.

Join TCCI @ Bopal and Satellite in Ahmedabad.

Call us @ 9825618292

Visit us @ http://tccicomputercoaching.com/

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s