Ask Question
4 January, 05:07

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

+1
Answers (1)
  1. 4 January, 05:21
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers