Sail E0 Webinar
Question
Which of the following method returns true if the cursor has documents ?
Options:
A .  hasMethod()
B .  hasNext()
C .  hasDoc()
D .  All of the mentioned
Answer: Option B


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



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers