Ask Question
8 May, 23:56

Which of the following can you not code in a subclass? Select one: a. a method with the same signature as a method in the superclass b. a call to a constructor of the superclass c. a method that's not defined by the superclass d. a call to a private method of the superclass

+4
Answers (1)
  1. 9 May, 02:14
    0
    Option D: a call to a private method of the superclass

    Explanation:

    Option a: a method with the "same signature" is allowed in the subclass. There will not be any confusion because the object which is trying to call the method will decide whether to call the sub class or super class.

    Option b: a call to a super class constructor is possible because, when you create an object of sub class automatically the super class constructor will be called. Even the sub class constructor can call the super class constructor explicitly.

    Option c: A subclass can create method that's not defined by the super class

    Option D: a private method is private inside the class and hence even the object of that class cannot access.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which of the following can you not code in a subclass? Select one: a. a method with the same signature as a method in the superclass b. a ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers