There is an error and I'm not sure what I'm supposed to do without being unable to access the ArrayList in another class
package LifeGame;
import java.util.ArrayList;
public class Lists {
public static void main(String[] args) {
public ArrayList<String> tasks = new ArrayList<String>(); { // error on `tasks`
tasks.add("Phone");
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…