Q. 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
  • (C) To stop the execution of the program
  • (D) To indicate the method is static
πŸ’¬ Discuss
βœ… Correct Answer: (B) To indicate that the method should return a value

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
104
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
96%
Success Rate