Advertisements
Advertisements
प्रश्न
Define Return data type.
व्याख्या
Advertisements
उत्तर
- 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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: User - Defined Methods - EXERCISES [पृष्ठ ३३७]
