sharred preference null pointer exception
<pre><code>//Activity-- mTweetApp.SetCaseInfo(type,teet); //storing in another class

public void SetCaseInfo(String PatientType,ArrayList arr){
   // All objects are from 
   SharedPreferences settings =setSharedPreferences(DEALSPOTR_PREFS,0);
   SharedPreferences.Editor editor = settings.edit();
   editor.putInt("arrayLength",arr.size());
   for(int i=0; i&lt;=arr.size(); i++){
      editor.putInt("Teethsselected"+String.valueOf(i), (Integer) arr.get(i));
   }
   editor.putString("view", PatientType);
   for(int i=0; i&lt;=arr.size(); i++){
       System.out.println("Teethsselected-----"+(Integer) arr.get(i)+"type---&gt;"+PatientType);
   }
}

public void getCaseInfo() {
   SharedPreferences settings =getSharedPreferences(DEALSPOTR_PREFS, 0);
   int arraySize = settings.getInt("arrayLength", 0); 
   int teeth[] =new int[arraySize];
   for(int i=0; i&lt;arraySize; i++){
      teeth[i] = ettings.getInt("Teethsselected"+String.valueOf(i),0);
   } 
   String type =settings.getString("view"," ");
}
</code></pre>

<p>how to fix this?</p>
