Check out example codes for "java pass array as method parameter". It will help you in understanding the concepts better.

Code Example 1

In java, you can create an array like this:
	new int[]{1, 2, 3};
replace `int` with whatever you want

public static void doSomething(int[] list) {
	System.out.println("Something is done."); 

public static void main(String[] args) {
  	doSomething(new int[]{1, 2, 3});

Learn ReactJs, React Native from