"令牌' al1上的语法错误,此令牌后预期的VariableDeclaratorID"在x.add(al1);线。知道为什么会这样吗?忽略第3行
import java.util.ArrayList;
public class GameState {//creates a list of the three coins to work with
private ArrayUnsortedList<Coin> coins = new ArrayUnsortedList<Coin>(3);
private ArrayList<ArrayList<Integer>> x = new ArrayList<ArrayList<Integer>>(3);
private ArrayList<Integer> al1 = new ArrayList<Integer>();
private ArrayList<Integer> al2 = new ArrayList<Integer>();
private ArrayList<Integer> al3 = new ArrayList<Integer>();
x.add(al1);
答案 0 :(得分:2)