‹ Back to the paper
For overloaded method, signature matching happens at compile time. Given below are two statements…
Assertion: For overloaded method, signature matching happens at compile time.
Reason: The overloaded method must have a unique signature for its every prototype.
Given below are two statements marked Assertion and Reason. Read the two statements carefully and choose the correct option.
- (a)Both Assertion and Reason are true and Reason is the correct explanation for Assertion.
- (b)Both Assertion and Reason are true but Reason is not the correct explanation for Assertion.
- (c)Assertion is true and Reason is false.
- (d)Both Assertion and Reason are false.
Answer
Answer
AICorrect option: (a)
Answer: (a) Both Assertion and Reason are true and Reason is the correct explanation for Assertion.
Method overloading is resolved by the compiler at compile time (static binding) precisely because every overloaded prototype has a unique signature, allowing the compiler to unambiguously match the call to the correct method at compile time itself.
From ISC 2025 Improvement Computer Science Paper 1, question 1(ii).