class sup{
void method() throws Exception{
System.out.println("sup");
}
}
public class NewMain1 extends sup{
/** Creates a new instance of NewMain1 */
public NewMain1() {
}
@Override
void method(){
System.out.println("new");
}
/**
* @param args the command line arguments
*/
public static void main(
String[] args) throws Exception{//#1
// TODO code application logic here
sup s = new NewMain1();
s.method();
}
}
why we should throws Exception at #1?
Overload method() doesn't throws Excpetions?
best wishes.