make arrays accessible throughout methods and classes
<p>how do i make an array accessible throughout classes and methods?
right now i have something similar to</p>

<pre><code>public class Class
{
public int[] array = new int[value];
public static int var;
    public void callArray()
    {            
        for(int x = 0; x &lt; array.length; x++)
            var++;
        for(int x = 0; x &lt; array.length; x++)
        {
            value[x] = var;
            var = 0;
        }
    }

    public void anotherMethod()
    {
    int[] array = new int[var];
         for(int x = 0; x &lt; array.length; x++)
             System.out.println(array[x])
    }
}  
public class AnotherClass extends Class
{
int[] array = new int[var];
    for(int x = 0; x &lt; array.length; x++)
        System.out.println(array[x]);
}
</code></pre>

<p>and i get a null pointer or array out of bounds every time i do things like that
how can i make array available throughout multiple classes and methods?</p>
