名前のテキスト ファイルを配列に読み取り、その配列をメイン クラスに返すクラスを作成しようとしています。ただし、配列を定義しようとするとエラーが発生します。
public class Test{
String[] foo;
String[] zoo;
String[] yoo;
}
String[] yoo でエラーが発生します
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];