By "call" I assume you mean you want access to the object so you can call its methods.
One way would be to add a getter method to the class that the arraylist is in so you could call the method and it would return a reference to the arraylist.
You have several variables defined as static. That means there will only be one of them in existence when the code executes. If you create two instances of the Screen2 class, they will share that one instance.
With the way you have the variables coded, you can directly access public static variables in the Screen2 class directly:
Screen2.<staticVariable>
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
What is the posted code supposed to do?
What arraylist is it supposed to be accessing?
Why do you define an arraylist in a method?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
You use two different instances of that variable, one on line 11 and one on line 12.
The compiler can't find a definition for the one on line 12.
Where is its definition?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16