You just create one and pass.
   public static void main(String[]args){
         int[] intArray=new int[]{1,2};   //took sample elements
         int sum = calculateSum(intArray); // create an array and pass here.
      }
I took the integers 1,2 for test
solved how to invoke and pass arguments to an int array [closed]