Ask 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 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

+3
Answers (1)
  1. 11 October, 01:09
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers