how to call method with array input :     int n;

   //this is a method for get and set value of array
 public static int[] avali(int n) { 

        System.out.println("insert number");

        Scanner num = new Scanner(System.in);
        int a1[] = new int[n];
        for (int i = 0; i < n; i++) {

            a1[i] = num.nextInt();

        }

        return a1;
    }

 //method of inverse array
   public void dovomi(int[] a) {

        for (int i = n; i > 0; i--) {

            System.out.println(a);
        }

    }

    public static void main(String[] args) {
        System.out.println("insert arr size: ");
        Scanner n = new Scanner(System.in);
        JavaApplication17 x = new JavaApplication17();
        x.avali(n.nextInt());
        x.dovomi(a1);

    }
