0

I want to create my own custom exception class which extends the error class in java(like we extend exception class while creating our own exception).Can I do like this? If yes/no give the opinion. Thanks in advance.

DJanssens
  • 17,849
  • 7
  • 27
  • 42
smit03
  • 1
  • Probably duplicate of this [http://stackoverflow.com/questions/1070590/how-can-i-write-custom-exceptions] – Vishal Sep 23 '15 at 09:44
  • Dear vishal, in the given example the custom exception class is created by extending class exception or runtimeException. My question is, can we create our own custom exception class by extending error class which is in throwable class hierarchy. – smit03 Sep 23 '15 at 09:51

0 Answers0