Converting DBObject to Java Object while retrieve values from MongoDB
问题 From my Java application, I have stored the values in mongoDB in ArrayList(set of Java objects). How can I retrieve the data from DBObject I am storing the data in mongoDB like this: { "students" : [{"firstName" : "Jesse", "lastName" : "Varnell", "age" : "15", "gender" : "M" }, { "firstName" : "John", "lastName" : "Doe", "age" : "13", "gender" : "F"}] } I am having the Java Object for the Student like: public class Student { public String firstName; public String lastName; public String age;