Advertisements
Advertisements
Question
Define Return data type.
Definition
Solution
- It is the data type that appears before the method name in the method header.
- It specifies the kind of result that a method will return to its caller.
- A method's return type must be specified as void if it returns nothing.
- A return statement needs to be included in the method body when a method is defined with a return type.
shaalaa.com
Is there an error in this question or solution?
Chapter 5: User - Defined Methods - EXERCISES [Page 337]