English

Explain the method of a return statement in Java programming. - Computer Applications

Advertisements
Advertisements

Question

Explain the method of a return statement in Java programming. 

Answer in Brief

Solution

  1. When defining a method with a return type, the body must include a return statement.
  2. The return statement sends the method's outcome to the calling program.
  3. Because it appears at the end of a method, it is also known as a method terminator. 
shaalaa.com
  Is there an error in this question or solution?
Chapter 5: User - Defined Methods - EXERCISES [Page 337]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 5 User - Defined Methods
EXERCISES | Q VI. 15. | Page 337
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×