Title: Java & MongoDB - Display Collections
Open Graph Title: Java & MongoDB - Display Collections
Description: To display list of collections, you can use database.listCollectionNames() method to get the list of collection names in the databases. Following is the code snippet to display list of collections − Now, let's compile and run the above program as
Open Graph Description: To display list of collections, you can use database.listCollectionNames() method to get the list of collection names in the databases. Following is the code snippet to display list of collections − Now, let's compile and run the above program as
Opengraph URL: https://www.tutorialspoint.com/java_mongodb/java_mongodb_display_collections.htm
Domain: www.tutorialspoint.com
| None | IE=edge |
| og:type | article |
| og:image | https://www.tutorialspoint.com/images/tp_logo_436.png |
Links:
Viewport: viewport-fit=cover, width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=yes