I don’t really understand the second question, is my answer to the second question correct?
- Which of the following is not a method of System.Object?
- What is the most generic (least derived) interface or subclass of System.Object of which it is a method?
a. GetType()
b. ToString()
c. Equals(object obj)
d. Clone()
My Answers:
Clone() is not a method of System.Object.
ICloneable for Clone. System.Object is the root type, the rest of the methods are its direct members.
What is the answer to the second question? What does it mean?
Any advice would be very much appreciated.
Your answer to the first question is of course correct. Proof.
The second question means, that if you had interface
IExtendedCloneablewhich would derive fromICloneable(hadICloneableas parent interface), it would not be a corect answer, because ICloneable is more generic (less derived) – it is closer toobjecton the inheritance tree.If there wasn’t that restriction, you could say that
Clone()is a member of System.Windows.Forms.Control.ControlCollection and you would be right, but the answer wouldn’t be really relevant.Thanks to that restriction,
ICloneableis the answer.