How to return an array in JavaIn this section, we are going to learn how to return an array in Java. Remember:
Example 1In the following example, the method returns an array of integer type. Output: Example 2In the following example, the method returns an array of double type. Output: Example 3In the following example, method returns an array of object type. Output:
Next TopicJava Tutorial
|