I want to initialize a hashtable inside my class only once for my web application.
How can you do this in a thread-safe manner in case?
public class MySettings {
private HashTable<int, SomeObject> settings;
}
Should it be marked static or final or volatile? Do I wrap it in a synchronize?
Also, how can I set the properties of SomeObject inline? Is it possible in java?