java - how to work around immutable String[]
<p>I (think I) understand why I get a compile error (Illegal Start of Expression) at the tmpString = {"",...} line in this method (--> tmpString is immutable, though it does not have a problem with the tmpBase line before), but what is the cleanest way to fix this - perhaps another variable type?  Thank you.</p>

<pre><code>public static ArrayList&lt;String&gt; myMethod(String tmpWord, int tmpNum)
{
    ArrayList&lt;String&gt; tmpReturn = new ArrayList&lt;String&gt;(); 
    String   tmpBase   = tmpWord.substring(0,tmpWord.length()-2);
    String[] tmpString = {"a","a","g","g","ya"};
    switch(tmpNum)
    {
        case  1: tmpBase = "xx";
                 break;
        case  2: tmpBase = "yy";
                 break;
        case  3:
                 break;
        default:
        {
            tmpBase   = "-";
            tmpString = {"","","","",""};
            break;
        }
    }
    for (int j=0; j&lt;5; j++)
        tmpReturn.add( (tmpBase + tmpString[j]) );
    return tmpReturn;
}
</code></pre>