Inheritance in Java MCQ

Programming Language > Java Programming Language

Test your knowledge of inheritance in Java with these multiple choice questions. Improve your understanding of object-oriented programming concepts and become a Java expert. Take the quiz now! ➲ Inheritance in Java MCQ - Quiz


  • A super
  • B this
  • C extent
  • D extends
  • A upper
  • B super
  • C this
  • D none of the mentioned
  • A public member
  • B private member
  • C protected member
  • D static member
  • A class B + class A {}
  • B class B inherits class A {}
  • C class B extends A {}
  • D class B extends class A {}
  • A 0
  • B 1
  • C 2
  • D Compilation Error
  • A 2 2
  • B 3 3
  • C Runtime Error
  • D Compilation Error
  • A 1 2
  • B 2 1
  • C Runtime Error
  • D Compilation Error
  • A 1 2
  • B 2 1
  • C 1 3
  • D 3 1
  • A "X extends Y" is correct if and only if X is a class and Y is an interface
  • B "X extends Y" is correct if and only if X is an interface and Y is a class
  • C "X extends Y" is correct if X and Y are either both classes or both interfaces
  • D "X extends Y" is correct for all combinations of X and Y being classes and/or interfaces