I want to use a class in Java for storing data which can be accessed for all other classes. Just like if it was a Mysql table.
This class should have only one instance, this way whenever its content is changed, all classes see the same content.
What is the best way to do it? I have read about the singleton pattern, but I don't know if it would be a design error to use it.