What things should be kept in mind while creating your own exceptions in Java?

Question :

What things should be kept in mind while creating your own exceptions in Java?

While creating your own exception: •All exceptions must be a child of Throwable. •If you want to write a checked exception that is automatically enforced by the Handle or Declare Rule, you need to extend the Exception class. •You want to write a runtime exception, you need to extend the RuntimeException class.


Similar Questions


CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz