I can't figure out why I can't add items to the ArrayList. I have tried a couple different ways of adding items and they don't work.
class Problem {
public ArrayList<String> problems = new ArrayList<String>();
public ArrayList<String> answers = new ArrayList<String>();
private String question1 = "What is 2+2?";
private String question2 = "What is the square root of 25";
private String question3 = "What is the next number in the sequence? {2, 4, 6}";
private String question4 = "What is 8*8?";
String[] temp1 = {question1, question2, question3, question4};
for (String s : temp1)
    problems.add(s);
}
I have also tried
problems.add(question1);
problems.add(question2);
problems.add(question3);
problems.add(question4);
This does not work either.
Compiler says that identifier is expected.