package study;
class ParentA{
public void display() throws NullPointerException{
}
}
class ChildA extends ParentA{
public void display() throws Exception{
}
public class Ex02_Exception08 {
public static void main(String[] args){
ParentA pa = new ChildA();
try {
pa.display();
} catch (NullPointerException ne) {
e.printStackTrace();
}
}
}
댓글 0