Your approach won't work. Static variables are class variables. So all instances of the Total class will share the same ArrayList, and likewise, all instances of Selection will share the same (reference to) ArrayList, however - instances of Total will refer to a different ArrayList than instances of Selection.
That's a mouthful. But what you need to do is pass the same instance of ArrayList to each class, either through their constructors or through a setter method. Alternately, you could have a static method from a different class which returns the same reference to ArrayList.
The important take-home point is that you misunderstand the meaning of static
. Also, what you're asking about is dependency injection. There have been entire frameworks developed to address this problem, the most popular example in Java being Spring framework. Using a framework would be gross overkill for your requirement, but I just thought I'd let you know.