Ask Question
20 November, 06:25

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

+5
Answers (1)
  1. 20 November, 07:46
    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?
Find an answer to your question ✅ “Can a non-void method use the keyword return without returning a value? Explain your answer. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers