engineering computer science MCQ #1249

What is the purpose of the 'super' keyword in Java?

engineering computer science MCQ #1249

  1. Question 1

    Q1. What is the purpose of the 'super' keyword in Java?

    • A) To access subclass members
    • B) To access superclass members
    • C) To override methods
    • D) To implement interfaces

    Answer: To access superclass members

    Explanation: The 'super' keyword is used to access members of the superclass from a subclass, allowing for code reuse and facilitating inheritance.