title: Confusion about mongodb java driver
body: <p>I am a beginner to MongoDB and I'm playing around with it using the JAVA driver.</p>
  
  <p>I have the following code</p>
  
  <pre><code>MongoClient client = new MongoClient();
  DB d = client.getDB("world");
  DBCollection c = d.getCollection("zips");
  DBCursor cursor = c.find();
  </code></pre>
  
  <p>Now my question is that I want to use a simple cursor to go through the documents. The getDB() method is deprecated but it works fine. In the documentation it's mentioned that getDB can be replaced with MongoClient.getDatabase(); but getDatabase() returns a MongoDatabase not a DB.</p>
  
  <p>Can someone point out the correct way to make a DBCursor without using any deprecated method. Thanks.</p>
  
  <p>PS: I know there are frameworks like morphia, jongo etc but please keep them out of this discussion. I want to currently resort only to the JAVA driver.
  EDIT: The difference is about getting a cursor in the JAVA driver not between DB and MongoClient</p>