我正在尝试创建一个类,它将名称的文本文件读入一个数组,然后将该数组返回给主类。但是,在尝试定义数组时出现错误。
public class Test{
String[] foo;
String[] zoo;
String[] yoo;
}
我在 String[] 上收到错误 yo
Syntax error on token ";", { expected after this 
token
我真的不知道发生了什么,有人可以帮忙吗?
编辑 - 代码的实际部分
    String[] swords;
    String[] prefix;
    String[] suffix;
    String[] rarity;
    String[] colors = {"2","3","4","5","6","7","9","a","b","c","d","e","f"};
    String[] bows = new String[3];
    String[] enchantments = {"Frost","Igniton","Projection","Explosion","Enhance Jump","Enhance Speed","Resist Flames","Invisibility"};
    rarity = new String[1000];
    swords = new String[1000];
    bows = new String[1000];
    prefix = new String[1000];
    suffix = new String[1000];