What is the control flow, when Exception occurs

Below is an example showing different flow of control, when different Exception occurs, during program execution.
However, exceptions should not be used only to control the flow, rather appropriate control flow statements can be used.


public class ExceptionControlFlow {
	public static void main(String[] args){
	try{
	System.out.println("stmt 1");
	Object obj = null; 
	System.out.println("stmt 2");
	obj.getClass(); //NullPointerException
	System.out.println("stmt 3");
	}
	catch(NullPointerException et)
	{
	System.out.println("stmt 4");
	System.out.println("Exception occurred:"+et.getMessage());
	}
	catch(Exception ep)
	{
	System.out.println("stmt 5");
	}
	}

}