About 3,630,000 results
Open links in new tab
  1. Passing an Array to a Function in Java - GeeksforGeeks

    Nov 13, 2024 · Passing an array to a function is an easy-to-understand task in Java. In this article, we will check how to pass an array as a method parameter. Let function GFG () be called from …

  2. pass array to method Java - Stack Overflow

    Feb 6, 2012 · you have to use java.util package; array can be passed by reference; In the method calling statement. Don't use any object to pass an array; only the array's name is used, don't …

  3. Passing an array of objects to a method in java - Stack Overflow

    findMaxPos is a static method of your class staticMethod. When you are not calling a static function inside the class where it is defined, you need to call it with the name of the class …

  4. Passing Array to Function In Java - Tpoint Tech

    In this section, we will learn how we can pass an array to a user-defined function and will notice how it makes the code more optimistic as well as efficient. Generally, the purpose of passing …

  5. Passing a string array as a parameter to a function java

    Jul 28, 2012 · I would like to pass a string array as a parameter to a function. Please look at the code below String[] stringArray = {'a', 'b', 'c', 'd', 'e'}; functionFoo(stringArray);

  6. How to Return an Array in Java? - GeeksforGeeks

    Jun 29, 2022 · Passing an array to a function is an easy-to-understand task in Java. In this article, we will check how to pass an array as a method parameter. Caller Function Vs Called …

  7. How To Pass / Return An Array In Java - Software Testing Help

    Apr 1, 2025 · This tutorial will explain how to pass an array as an argument to a method and as a return value for the method in Java with simple examples.

  8. Passing Array to a Function in Java - TecAdmin

    Apr 26, 2025 · In this article, we’ll dive deep into the process of passing an array to a function (method) in Java and illustrate with examples. Basics of Array in Java. An array is a collection …

  9. How to pass an array to function in Java - CodeVsColor

    Dec 13, 2021 · In this post, we will learn how to pass an Array to a function or method in Java. We can pass an array to a function in a similar way we do it for other arguments. Let’s learn how …

  10. Passing and Getting array as parameter to a function in java

    Jan 26, 2012 · To pass an array as parameter to a method you can use: public void X(int[] array) { } If you want to access an array from two different methods of the same class, you can make …

  11. Some results have been removed
Refresh