Java, Create array if it doesn't already exist
<p>I couldn't find anything on that while googling
so
I want to create an array only if it doesn't already exists.</p>

<p>EDIT: I mean not initialized</p>

<p>I know how to check for values in the array</p>

<p>Should be simple but I'm stuck</p>

<p>best regards</p>

<pre><code>static long f(long n) {
    int m = (int)n;
    **if (serie == null) {

   long[] serie = new long[40];
    }**
    if (n == 0) {
        return 0;
    }
    else if (n==1) {
        return 1;
    }
    else {
        long asdf = f(n-1)- 2*(f(n-2)) + n;
        return asdf;
    }
}
</code></pre>

<p>something like that
a recursive function and I want to save the values in an array </p>
