I have run the following code, it print out
"in B zzz", that means given answer is wrong!
Moderator, could you move this
thread to Mock Exam errata forum please.
//file B.java
import pack1.*;
public class B extends A{
void zzz(){System.out.println("in B void zzz");}
public static void main(
String[] args){
A a = new B();
B b = new B();
A a1 = new A();
// a.zzz(); compile error
b.zzz();
// a1.zzz(); compile error
}
//package pack1;
package pack1;
class A{
final void zzz(){System.out.println("in A void zzz"); }
}//