Netbeans 我无法暂时实例化没有值的字符串数组,以便在以后添加值

Netbeans 我无法暂时实例化没有值的字符串数组,以便在以后添加值,netbeans,java-me,Netbeans,Java Me,我的代码: String [] temp; temp = {"one","two","three"}; 我得到这个错误: Illegal start of expression, ';' expected. 大括号,您使用它们的方式,只能在数组声明语句中使用。i、 e String[] temp = {"one","two","three"}; 大括号,您使用它们的方式,只能在数组声明语句中使用。i、 e String[] temp = {"one","two","three"};

我的代码:

String [] temp;
temp = {"one","two","three"};
我得到这个错误:

Illegal start of expression, ';' expected.

大括号,您使用它们的方式,只能在数组声明语句中使用。i、 e

String[] temp = {"one","two","three"};

大括号,您使用它们的方式,只能在数组声明语句中使用。i、 e

String[] temp = {"one","two","three"};