title: Singleton pattern - doubt in Head First Design Patterns book
body: <p>On page 175, there is an example of Chocolate Boiler class. Something like this:</p>
  
  <pre><code>public class ChocolateBoiler {  
  
    private boolean empty;  
    private boolean boiled;  
  
    public ChocolateBoiler {  
      empty = true;  
      boiled = false;  
    }  
   // and then three methods to fill, drain and boil which changes the  
   // status of these two flag depending of situation
  }  
  </code></pre>
  
  <p>In section "brain power" they ask a question "How might things go wrong if more than one instance of ChocolateBoiler is created in an application?"</p>
  
  <p>I'm not sure what's the problem with this class. Why do we introduce a singleton pattern here? These two flags are not static and so one per instance. So how creating more than one instance can mess things up? </p>