title: Good way of giving a singleton getInstance() method with and without arguments
body: <p>I actually have a singleton class which has two methods getInstance() and getInstance(param1, param2).</p>
  
  <p>getInstance() initializes a singleton object with default values whereas getInstance(param1, param2) initializes a singleton object with user defined parameters (param1 and param2).</p>
  
  <p>But the problem arises when user first calls a getInstance() and do a getInstance(param1, param2) later or viceversa. The same is the case when getInstance(with params) is called twice with different arguments. i.e., getInstance(param1, param2) called first and getInstance(param3, param4) next. </p>
  
  <p>In all the above cases the second call is ignored because a singleton object is initialized only once and it should not be changed again. But, the user will never know all this and would be under the impression that his second call got executed successfully .</p>
  
  <p>Can someone suggest the best way to resolve this problem ?</p>