Another important detail we should take into account is the following statement from K&B 6, page 363:
An exception that's never caught will cause your application to stop running.
I've modified the code as follows:
Due to the fact that Exception is propagated until the bottom of the call stack (in other words: never caught), the
System.out.println("program has completed correctly") in line 6 is never reached - opposed to the scenario where Exception is caught at the right place (try-catch-block around line 5).
That's the output after running this piece of code:
Exception in thread "main" java.lang.Exception
at Propagate.reverse(Propagate.java:12)
at Propagate.main(Propagate.java:5)