I need to store some value in a variable which can be written from one class and read from another class so basically I need to hide the writing class to reading class.
So will it be a good option to have that variable in a separate class as a static variable? This project is regarding the OSGI framework.
Is there any design pattern to solve this problem or will this be okay?