Vidyalelo
Java Programming · Q23

Constructors and Methods

Programming · Java Programming · question 23

Q23

What is the purpose of the "return" statement in a method in Java?

A.
To specify the method's access modifier
B.
To indicate that the method should return a value
Answer
C.
To stop the execution of the program
D.
To indicate the method is static

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board