title: ArrayList value is not printing in the LogCat
body: <p>DBAdapter class function:</p>
  
  <pre><code>public void getValues(){
  
          Cursor mCursor = db.query(DBAdapter.DATABASE_TABLE2, new String[] {
                  EDGE_ID,
                  SOURCE_NODE_ID,
                  DESTINATION_NODE_ID,
                  VALUE1}, null, null, null, null, null);
          mCursor.moveToFirst();
          while(!mCursor.isAfterLast()) {
              mArrayList.add(mCursor.getString(mCursor.getColumnIndex(DBAdapter.SOURCE_NODE_ID)));
              mCursor.moveToNext();
          }
  
          for(String d1:mArrayList) {
              System.out.println(d1);
          }
      }
  </code></pre>
  
  <p>Below is main activity class :</p>
  
  <pre><code>public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          setContentView(R.layout.main);
  
      final DBAdapter db = new DBAdapter(this);
      db.open();
      db.getValues();
      db.close();
  }
  </code></pre>
  
  <p>According to above code I should get an array list which contain the values of my database table of </p>
  
  <p>SOURCE_NODE_ID</p>
  
  <p>attribute.
  and I want to print this arraylist in LogCat. But I get following error: </p>
  
  <pre><code>05-30 14:51:39.435: E/AndroidRuntime(4954): FATAL EXCEPTION: main
  05-30 14:51:39.435: E/AndroidRuntime(4954): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.navigationsystem/com.navigationsystem.NavigationSystemActivity}: java.lang.NullPointerException
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.os.Handler.dispatchMessage(Handler.java:99)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.os.Looper.loop(Looper.java:137)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.ActivityThread.main(ActivityThread.java:4424)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at java.lang.reflect.Method.invokeNative(Native Method)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at java.lang.reflect.Method.invoke(Method.java:511)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at dalvik.system.NativeStart.main(Native Method)
  05-30 14:51:39.435: E/AndroidRuntime(4954): Caused by: java.lang.NullPointerException
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at com.navigationsystem.DBAdapter.getValues(DBAdapter.java:117)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at com.navigationsystem.NavigationSystemActivity.onCreate(NavigationSystemActivity.java:53)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.Activity.performCreate(Activity.java:4465)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
  05-30 14:51:39.435: E/AndroidRuntime(4954):     ... 11 more
  </code></pre>
  
  <p>What is wrong in this code.</p>
  
  <p>thanks.</p>