title: What is The use of moveToFirst () in SQLite Cursors
body: <p>I am a programming newbie
  and I found this piece of code in the internet and it works fine</p>
  
  <pre><code>Cursor c=db.query(DataBase.TB_NAME, new String[] {DataBase.KEY_ROWID,DataBase.KEY_RATE}, DataBase.KEY_ROWID+"= 1", null, null, null, null);
          if(c!=null)
          {
              c.moveToFirst();
          }
  </code></pre>
  
  <p>but I am not able to understand the use of the</p>
  
  <pre><code>if(c!=null)
      {
          c.moveToFirst();
      }
  </code></pre>
  
  <p>part. What does it do exactly , and if I remove the</p>
  
  <pre><code>if(c!=null) { c.moveToFirst(); }
  </code></pre>
  
  <p>part, the code doesn't work.</p>