title: How to retrieve a subset of fields using the Java MongoDB driver?
body: <p>new poster here, I found this previous post but it's on C#,
  I tried doing this query straight into the java code of a JSP page, for some reason, it doesn't accept the info in the {} of the find() query and just gives out an error...</p>
  
  <p>So peeps, how do I do this in Java:</p>
  
  <pre><code>// retrieve ssn field for documents where last_name == 'Smith':
  db.users.find({last_name: 'Smith'}, {'ssn': 1});
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>PS: why the hell does C# have the nice little .Exclude() and .Include() commands and java doesn't? <em>cries</em></p>