aspose file tools*
The moose likes Beginning Java and the fly likes Exception Handing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Exception Handing

Ma JianHui
Greenhorn

Joined: Mar 01, 2008
Posts: 6
public class Plane {
static String s = "-";

public static void main(String[] args) {
new Plane().s1();
System.out.println(s);
}

void s1() {
try{
s2();
}catch(Exception e) {
s +="c";
}
}

void s2()throws Exception {
s3(); s +="2";
s3(); s +="2b";
}

void s3() throws Exception {
throw new Exception();
}

}


The output is : "-c",what is going on?
Please help me!Thanks!
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Please avoid posting the same query more than once as it wastes time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception Handing
 
Similar Threads
K&S chapter 3 q-6
Exception
Exception Handing
exception question from kb
Exception Handing