About 20,300 results
Open links in new tab
  1. Java return Keyword - W3Schools

    Definition and Usage The return keyword finishes the execution of a method, and can be used to return a value from a method.

  2. Java return Keyword - GeeksforGeeks

    Jan 2, 2025 · return keyword in Java is a reserved keyword which is used to exit from a method, with or without a value. The usage of the return keyword can be categorized into two cases:

  3. return Keyword in Java: Usage & Examples - DataCamp

    Learn how to use the `return` keyword in Java to exit methods and return values. This guide covers syntax, examples, and best practices for effective Java programming.

  4. Returning a Value from a Method (The Java™ Tutorials - Oracle

    Within the body of the method, you use the return statement to return the value. Any method declared void doesn't return a value. It does not need to contain a return statement, but it may do so. In such a …

  5. Mastering the `return` Statement in Java - javaspring.net

    Nov 12, 2025 · This blog post will provide a comprehensive overview of the return statement in Java, including its basic concepts, usage methods, common practices, and best practices.

  6. Java return Keyword - programguru.org

    Learn how to use the return keyword in Java. This beginner-friendly guide explains the return statement with detailed examples, use cases in methods, and program outputs.

  7. Java return Examples - The Developer Blog

    Use the return keyword in methods. Return multiple values, return expressions and fix errors. | TheDeveloperBlog.com

  8. Java Return Statement: Syntax, Examples, Flowchart

    Learn about the return statement in Java with examples. Understand its types, different uses, common mistakes to avoid, and more. Read now!

  9. Understanding the Java return Statement with if-else and ... - Medium

    Oct 5, 2024 · The return statement in Java serves a fundamental role by terminating a method and optionally returning a value to the method's caller. While simple on the surface, return becomes more...

  10. return Statement in Java with Example - javabytechie

    May 28, 2022 · In Java, 'return' is a keyword that is used to return a value after the execution of a method. After executing the return statement, the execution control returns to the code that invoked it.