Error passing array to a function. It is not able to compile
<p>My array should be passed to a function, but my program has an error and does not compile. What am I doing wrong?</p>

<blockquote>
  <ol>
  <li>I am getting an error on line 13: "a1e.averData(scores,MAX_SIZE);"</li>
  <li>The error states,"non-static variable scores cannot be referenced from 
  a static context. Assign Return Value to New Variable"</li>
  <li>I also tried assigning the return value to a new variable.  It looked like this: "float averData = a1e.averData(scores,MAX_SIZE);"</li>
  <li>The error changed to this: "non-static variable scores cannot be referenced from a static context. non-static variable MAX_SIZE cannot be referenced from a static context"</li>
  <li>I have tried moving it from the main to other spots in the program, but it just doesn't seem to want to work for me, and I am unsure of how to fix it. </li>
  </ol>
</blockquote>

<p>Here is my code:</p>

<pre><code>    package array1example;

    public class Array1example 
    {    
       int i, sum;
       float avg;
       int scores[];
       int MAX_SIZE = 0;
        /**
         *
         * @param args
         */
         public static void main(String[] args)
        {
        /* An example of an array being passed to a function
           This program stores integers in an array
           and computes their average*/


           Array1example a1e = new Array1example(); 
        }

        public Array1example() 
        {
        this.scores = new int[]{5, 5, 12, 17, 11};
        a1e.averData(scores,MAX_SIZE);
        }
        private float averData(int[] scores1, int MAX_SIZE1)
        {

            int size = 0;
            for(i=0, sum=0; i&lt;size; i++) 
            {
            System.out.println("Score " + " = " + scores1[i] );
            sum += (scores1[i]);
        }
            avg = sum / i;
            System.out.println("Average score: " + avg );
        return avg;        
        }

        }
</code></pre>