(1Z0-811) Oracle Java SE11 Programmer Practice Test

1Z0-811 Java Class Design

Free · Instant Results

What is the result of attempting to compile and run the following code? class A { <br> public void method() { <br> System.out.println("A"); ,<br> } <br> } <br> class B extends A { <br> public void method() { <br> System.out.println("B"); <br> } <br> } <br> public class Test { <br> public static void main(String[] args) { <br> A obj = new B(); <br> obj.method(); <br> } <br> }
▶ Start Practice Test