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

Code Example 1

public static void doNothing(int[] someParameter) {
}

public static void main(String[] args) {
  	/*
    In java, you can create an array with
    the following syntax:
    	a = new int[]{1, 2, 3};
    */
	doNothing(new int[]{1, 2, 3, 4, 5}); 
}

Learn ReactJs, React Native from akashmittal.com