About 124,000,000 results
Open links in new tab
  1. 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:

  2. 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.

  3. 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 …

  4. 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.

  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. Understanding the Java return Statement with if-else and

    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 …

  8. Java return Examples - The Developer Blog

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

  9. 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!

  10. Mastering Return Statements in Java Methods - javaspring.net

    Nov 12, 2025 · A return statement in a Java method serves two main purposes: it terminates the execution of the method and optionally passes a value back to the calling code. …