KnowledgeBoat Logo
|

Computer Applications

Assertion (A) The return statement causes program control to transfer back to the caller of the method.
Reason (R) The return statement immediately terminates the method in which it is executed.

  1. Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
  2. Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
  3. Assertion (A) is true and Reason (R) is false.
  4. Assertion (A) is false and Reason (R) is true

User Defined Methods

4 Likes

Answer

Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).

Reason — Assertion (A) is true as the return statement causes program control to transfer back to the caller of the method. Reason (R) is also true as the return statement immediately terminates the method in which it is executed and the control transfers back to the caller method. Thus, Reason (R) correctly explains Assertion (A).

Answered By

2 Likes


Related Questions