Title: RES: [java-list] Certificacao BETA
Caro colega,
 
veja essa quest�o do simulado Simon Roberts:
 
What happens when you attempt to compile the following code?
1. class A           {  static void foo() {};         }
2. class B extends A {  public static void foo() {};  }
    
A) Compiler error at line 1. 
B) Compiler error at line 2. 
C) No compiler error. 
Resposta:
Correct selection is: C 

A static method may only be overridden by another static method;

that is what is done here, so the code compiles.

 
 

Responder a