i have a progam like this
class A {
public void test1(String s1) {
try {
System.exit(0);
} catch (Exception ex) {
ex.printStackTrace();
} finally {
System.out.println("from finally");
}
}
public void test2(String s2) {
// some text.....
}
}
In the below class
class Manager {
public static void main(String[] args) {
A a1 = new A();
a1.test1("test1");
a1.test2("test2");
}
}
I want a detailed answer of flow of the program after calling a1.test1
control will enter to the a2.test2 in Manager class or any other? Please clarify my doubt.
Once you hit
System.exit(0)the program is done. It terminates.