Computer Applications
Assertion (A) Method should be called explicitly either with object reference or class reference.
Reason (R) Method can be any user defined name.
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
- Assertion (A) is true and Reason (R) is false.
- 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 not a correct explanation of Assertion (A).
Reason — Assertion (A) is true as a method should be called explicitly either with object reference or class reference. Reason (R) is also true as a method can be any user defined name, except a keyword. Reason (R) is not the correct explanation of Assertion (A).
Answered By
3 Likes
Related Questions
This access specifier is the most open access level.
- Public
- Protected
- Private
- Default
The method to determine whether the specified char value is in uppercase or not.
- toUpperCase(char)
- toLowerCase(char)
- isLowerCase(char)
- isUpperCase(char)
Read the following text and choose the correct answer:
Public access specifier allows a class to expose its member variables and member functions to other functions and objects. Any public member can be accessed from outside the class.
Which of these access specifier must be used for class so that it can be inherited by another subclass?
- public
- private
- protected
- none of the mentioned
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.- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
- Assertion (A) is true and Reason (R) is false.
- Assertion (A) is false and Reason (R) is true