I am making a text adventure engine in Java, and in order to save memory, I have a database object that holds all the currently scraped items from an XML document. I want to use it from several different classes. How can I make it available to my classes? Currently I’m using a null static field with an appropriate mutator method.
Share
It might be useful to use a Singleton for this.