Variable cannot be resolved
<p>I am trying to create an item list, diffrent for each i and j variable. My code is:</p>

<pre><code>if (i == 0) { 
            if (j == 0) { 
                final CharSequence[] items = {"4:45", "5:00"}
            } else if (j == 1) { 
                final CharSequence[] items = {"4:43", "4:58"}
            } else if (j == 2) { 
                final CharSequence[] items = {"4:41", "4:56"}
            } else { 
                final CharSequence[] items = {"4:38", "4:53"}
}
</code></pre>

<p>...</p>

<pre><code>new AlertDialog.Builder(this)
               .setTitle("Hours")
               .setItems(items,
                new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialoginterface, int i) {
                      // getStation(i);
                   }
                })
               .show();
       }
</code></pre>

<p>I get an error in the line <code>.setItems(items,</code>:</p>

<pre><code>items cannot be resolved
</code></pre>

<p>I think that the compiler thinks that the <code>CharSequence[] items</code> may not be initialised or something... 
How can I make this programme run?</p>
