-1

When defining a custom Exception in java, how can we decide that it should be a checked or unchecked exceptions

1 Answers1

1

From https://www.geeksforgeeks.org/checked-vs-unchecked-exceptions-in-java/ which is actually quoting https://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html

If a client can reasonably be expected to recover from an exception, make it a checked exception. If a client cannot do anything to recover from the exception, make it an unchecked exception

realUser404
  • 2,111
  • 3
  • 20
  • 38