This is technically possible, but usually it is a bad design * . Instead, create a container for all of your games (name it class Games ), which will contain links to all created instances of the Game . Most likely, the Games class will have a createGame() method to fully control the life cycle of all created games.
Once you have the Games class, it can have a non-static increaseAllScores() method, which will basically iterate over all created instances of the Game and increase the number of all of them one at a time.
* - create a static List<Game> all instances and change this list inside the Game constructor.
source share