About 21,200,000 results
Open links in new tab
  1. Java return Keyword - W3Schools

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

  2. Java returning a variable - Stack Overflow

    May 11, 2014 · I am trying to use a method below to return a variable "charges" public static double billingM (double income, int min, double rate) { double charges; if (income <= 25000 …

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

  4. How to return 2 values from a Java method? - Stack Overflow

    May 14, 2010 · You can only return one value in Java, so the neatest way is like this: return new Pair<Integer>(number1, number2); Here's an updated version of your code:

  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 …

  6. How do I return a value from a Java function? - Stack Overflow

    Dec 28, 2016 · In order to make use of a return a value from a function you must assign it to a variable or use it as a test condition, etc. if(returnTen(mystery, subend, result, success) > 0){ …

  7. Passing and Returning Objects in Java - GeeksforGeeks

    Dec 27, 2021 · In java, a method can return any type of data, including objects. For example, in the following program, the incrByTen( ) method returns an object in which the value of an (an …

  8. Return Statement in Java - Tpoint Tech

    Feb 12, 2025 · In Java programming, the return statement is used for returning a value when the execution of the block is completed. The return statement inside a loop will cause the loop to …

  9. Returning Values From Methods (Java) – GeekTechStuff

    Jun 9, 2019 · Java Return Method The above example will return the integer 4 to the main method. The below methods so various examples of the returns including how values can be …

  10. How to Return Multiple Values From a Java Method - Baeldung

    May 11, 2024 · In this tutorial, we’ll learn different ways to return multiple values from a Java method. First, we’ll return arrays and collections. Then we’ll demonstrate how to use container …

  11. Some results have been removed
Refresh