global data, static and new
<p>Basic question from somebody coming from structured into object programming... hoping not to be too basic.</p>

<p>I want to have a large array of data that is been shared by different classes inside my application.
What's the best practice to do this?
Is this correct?</p>

<pre><code>public class LargeData {
    private static long[] myData;
    private static final int MAX = 100000;

    public LargeData() {
        myData = new long[MAX];
        // ... initialize
    }

    public long getData(int x) {
    // ... do whatever and return a long
    }
}
</code></pre>

<p>And if this is correct, how is the correct way to access this data from any of my classes? Should I make a</p>

<pre><code>LargeData ld = new LargeData();
</code></pre>

<p>inside every single class that wants to access to myData?</p>

<p>Thank you and sorry for being too easy... :)</p>
