Advertisements
Advertisements
प्रश्न
A method can use a single return statement.
विकल्प
True
False
MCQ
सत्य या असत्य
उत्तर
This statement is True.
Explanation:
- 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.
- A method that allows multiple return statements is commonly used in conditional logic (such as if-else).
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?