Home / CSE MCQs / MongoDB MCQs :: Discussion

Discussion :: MongoDB MCQs

  1. Which of the following method returns true if the cursor has documents ?
  2. A.
    hasMethod()
    B.
    hasNext()
    C.
    hasDoc()
    D.
    All of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

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


Be The First To Comment