Despite all the documentation that says beyond MongoDB 3.7 the MongoClient class can be instantiated, my Eclipse IDE shouts that MongClient cannot be instantiated. What could be the problem here ?
public class MongoDBExample
{
public static void main(String args[])
{
String result = null;
System.out.println("Making a connection to MongoDB..!");
MongoClient mongo_client = new MongoClient(); // ("mongodb://localhost:27017");
result = mongo_client.getClass().toString();
System.out.println("Result : " + result);
}
}

You're trying to instatiate
MongoClientwith the Legacy MongoDB Java Driver API way.Since version 3.7, you should do it this way:
The differences between the MongoDB Java Driver Legacy API and New API can be found clearly explained here
Also see the version 3.9 Javadoc for MongoClients, a factory for MongoClient instances.