← All AMCAT Flashcard Decks

OOP Concepts Flashcards

6 cards from real AMCAT practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 OOP Concepts flashcards as text
  1. Which OOP principle allows a class to have multiple methods with the same name but different parameters?

    Answer: Method Overloading

    Method overloading is compile-time polymorphism where multiple methods share the same name but differ in parameter list.

  2. In Java, when you call an overridden method through a base-class reference, which method is executed?

    Answer: Derived class method

    Java uses dynamic dispatch — the actual object type determines which method runs at runtime.

  3. Which access modifier makes a class member accessible only within the same class?

    Answer: private

    private restricts access to within the declaring class only.

  4. In Java, what is the purpose of the 'super' keyword?

    Answer: To call the parent class constructor or method

    'super' refers to the immediate parent class. It calls the parent's constructor (super()) or accesses the parent's method (super.method()).

  5. What is an abstract class?

    Answer: A class that cannot be instantiated and may have abstract methods

    An abstract class cannot be instantiated. It may have abstract methods (no body) that subclasses must implement.

  6. What is the key difference between an interface and an abstract class in Java?

    Answer: A class can implement multiple interfaces but extend only one abstract class

    Java supports multiple interface implementation but single class inheritance.