मराठी

A method can use a single return statement. - Computer Applications

Advertisements
Advertisements

प्रश्न

A method can use a single return statement. 

पर्याय

  • True

  • False

MCQ
चूक किंवा बरोबर

उत्तर

This statement is True.

Explanation:

  1. In Java, a method can return a value by a single return statement. The return statement terminates the method's execution and returns the provided value (if any) to the caller.
  2. A method that allows multiple return statements is commonly used in conditional logic (such as if-else).
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: User - Defined Methods - EXERCISES [पृष्ठ ३३५]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 5 User - Defined Methods
EXERCISES | Q III. 2. | पृष्ठ ३३५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×