Java Excetion Handling Part-9 (User Defined Exception - Checked and Unchecked) Custom Exception

preview_player
Показать описание
This video demonstrates how to create the user defined exception or custom exception in java. This video shows how to create user defined checked exception and user defined unchecked exception in java. User defined runtime exception, User defined compile time exception, custom runtime exception, custom checked exception.

For Learning More about Programming
Рекомендации по теме
Комментарии
Автор

This was helpful. Thank you, Sir.
Just to summarise:

If you want to create a Checked Exception i.e. an exception that must be handled or reported, without it you can’t even compile the program.
Then one should extend their custom Exception class from Java's *Exception* class.
Otherwise, if you want to create an Unchecked Exceptions i.e. you don't care whether the user of the class reports or doesn’t handle it.
Then in that case extend your custom Exception class from Java's *RuntimeException* class.

__nitinkumar__