I need to access an ArrayList through multiple functions in my main Java class file (the class file that contains main()).
To save myself having to pass the array list between functions, can I declare it outside of the methods? Is this bad practise? I understand this is okay with class files that are initialised as objects (private instance variables for example) - but what about the Main class file?
EDIT: It will be the only class variable declared and available to all functions in that class.