About 2,940,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. 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. Java return keyword example - CodeJava.net

    Aug 20, 2019 · In Java, the return keyword is used to stop execution of a method and return a value for the caller. Usage of this keyword is as following: return value; where value is can be of: A reference …

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

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

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

  8. Java return Keyword - CodeGym

    Apr 9, 2025 · A brief guide on Java return statement and how to implement it correctly. Let’s have a closer look at this keyword, return statement during error handling and the void.class

  9. Return Statement in Java: A Complete Guide with Examples and Use …

    Sep 5, 2025 · Return statement in Java is used to control the flow of methods and return results. In this article, you will learn how to use return statements in Java with examples and lucid explanations …

  10. The return keyword in Java programming language

    Sep 2, 2024 · In this tutorial, we will discuss The return keyword in Java programming language. The return keyword is typically used to end of the code or stop the execution of a method when its …