Answer the question
In order to leave comments, you need to log in
Why can't ArrayList be used outside of a function?
Why can't ArrayList be used outside of a function? I understand that this makes little sense, but the question is ripe
import java.util.*;
public class Tmp {
ArrayList<Integer> LI = new ArrayList<Integer>();
LI.add(1231);
}
Answer the question
In order to leave comments, you need to log in
LI.add(1231);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question