Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of the following method returns true if the cursor has documents?

a) hasMethod()
b) hasNext()
c) hasDoc()
d) all of the mentioned

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

Join The Discussion