I suppose programmatically thrown exceptions mean those exceptions which are thrown
usign throw keyword ...
In K&B it is written that AssertionError is programmatically thrown ,
Is it exception to JVM thrown exceptions??
I found that statement a little hazy myself. After re-reading pg. 379-380:
Those exceptions or errors that are either exclusively or most logically thrown by the JVM.
Those exceptions that are thrown explicitly by application and/or API programmers
JVM: If you try to call a method on a null reference variable, the JVM will throw a NullPointerException.
Programmatic: By putting an assert statement in your code you are actively deciding to throw an AssertionError if your assumption isn't true.
I guess that's why they consider it programmatically thrown. An AssertionError will never be thrown unless you go out of your way to use assertions in your code and/or turn on assertions when you run the program. Just like some of the other exceptions won't be thrown unless you (or one of the API programmers) decide to throw them. On the other hand, a NullPointerException can be thrown by the JVM whether you mean to or not.
Since I still don't know 100% which exceptions are programmatic vs. JVM, I will just memorize the chart on page 382.