1.

Which of the following method returns true if the cursor has documents?(a) hasMethod()(b) hasNext()(c) hasDoc()(d) all of the mentioned

Answer» Correct choice is (b) hasNext()

The best I can explain: hasNext() returns true if the cursor returned by the db.collection.find() query can iterate further to return more documents.


Discussion

No Comment Found