package cutils.delegate;
class ChineseExample extends Exception {
public ChineseExample() {
}
public String toString() {
return "ChineseExample";
}
public ChineseExample(String s) {
super(s);
}
public String language() {
return "ChineseExample";
}
public String bornCountry() throws ChineseExample {
String s = new String("china");
if (!s.equals("china"))
throw new ChineseExample("not born in china, born in" + s);
return "china";
}
}
class AmericanExample {
public String language() {
return "English";
}
public boolean liveUSA() {
return true;
}
}