Sudhakar Sharma wrote: . . . AssertionError (thrown by programmers for debugging purpose) . . .
It is not normal to throw an AssertionError, but to use the keyword
assert, which you correctly say is used for debugging, or more precisely for checking correctness of the program. I think the AssertionError is a bit of a "cheat" because
catch (Exception e) . . . is a common programming construct and the Error passes that, a bit like an unchecked Exception.