Ask Question
12 October, 03:34

Can a non-void method use the keyword return without returning a value? Explain your answer.

+2
Answers (1)
  1. 12 October, 04:03
    0
    False. A non void method must return something.

    Explanation:

    No, a non-void method has return statement in it and it returns a value based on the return type in the method declaration and the implementation of that method. Every non - void method has to return a value depending on its declaration. A non void method should have a return statement in it. As it is a non - void method and has return statement in it, it returns a value based on the implementation of that method. If a void method contains return statement in it, the method exits.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Can a non-void method use the keyword return without returning a value? Explain your answer. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers