title: Singleton and Context
body: <p>I have started learning android using Android Big Nerd Ranch guide. 
  Listing 9.1 Setting up the singleton (CrimeLab.java)</p>
  
  <pre><code>public class CrimeLab {
      private static CrimeLab sCrimeLab;
      private Context mAppContext;
  
      private CrimeLab(Context appContext) {
          mAppContext = appContext;
      }
  
      public static CrimeLab get(Context c) {
          if (sCrimeLab == null) {
              sCrimeLab = new CrimeLab(c.getApplicationContext());
          }
          return sCrimeLab;
      }
  }
  </code></pre>
  
  <p>Project- we are creating list of crime objects and we used this class to store the list.</p>
  
  <p>I am having trouble to understand the need of the Singleton class  provided in Listing 9.1. Why do we need this class in the first place? and why do wee need a context variable and what does it hold ? </p>
  
  <p>I searched google and found out that context is used to inform what is going on with other parts of the application. However, I didn't quite get what are we informing CrimeLab about? Can we create crimeLab without a singleton class? if Yes, why we used crimeLab as a singleton class?</p>