When is a java exception thrown -


please see below pseudocode method. if call readurls() throws exception, doesn't mean closeconnection() not executed , program flow return method calls getdata()?

thanks

getdata() throws exception {      setup();      readurls();      closeconnection(); } 

your assumption correct. avoid can this:

getdata() throws exception {     setup();     try {          readurls();     } {         closeconnection();     } } 

Comments