Forum Stats

  • 3,838,458 Users
  • 2,262,366 Discussions
  • 7,900,651 Comments

Discussions

OCJP

872842
872842 Member Posts: 9
Hi All,

class A{
public void process(){ S.o.p("A");
}
class B extends A{
public void process() throws IOException{
super.process();
S.o.p("B");
throw new IOException();
}
p s v m(String []args){
try{(new B().process();)}
catch(IOException e){ S.o.p("Exception");}
}
}

result: compile time error in line "public void process() throws IOException"
plz help me to find the reason.?

regards ,
Minuri...

Answers

This discussion has been closed.