Java core 2 - Java

Java fundamental quiz collection that covers Java features such as OOP, design common Java core classes.


Restart the quiz

Question:

Which of the following is true?

package a;
class A {
  public void foo() {
     System.out.println("a");
  }
}
package b;
import a.A;
public class B extends A {
  public void foo() {
    System.out.println("b");
  }
  public static void main(String[] args) {
    new B().foo();
  }
}

Answers:




© 2017 QuizBucket.org