title: best way to make a class with four maps singleton in java
body: <p>I have a java class with 4 Maps in it. I want all those Map's to be singleton what is the best way in the following ways. if there is any other better way please suggest</p>
  <ol>
  <li>making the class singleton and leaving the variables. That is making the constructor private and creating getInstance method.</li>
  <li>making the class singleton and making the variables static. That is making the constructor private and creating getInstance method. making all the methods which deal with these 4 maps static</li>
  <li>making class singleton, variables static and making each getmethod check if the map is null/size zero and if it is null/size zero calling the initalize method which will initalize all four maps. &lt;issue here will be 4 maps will have 4 get methods and we need to call synchronized on the initalize method&gt;</li>
  </ol>