Advertisements
Advertisements
Question
When a method returns the value, the entire method call can be assigned to a variable. Do you agree with the statement?
Short Answer
Solution
- Yes.
- Example:
int c = Obj.add(a, b);
In this example, the add(a, b) method returns a value assigned to variable c.
shaalaa.com
Is there an error in this question or solution?