What is the difference between the two query methods of mongodb?

  mongodb, question
db.getCollection('diseases').find({})
 db.diseases.find({})

There is no difference. However, if the collection name contains special characters, only the first method can be used.
Special characters are not recommended for collection names.