This method of the Connection class retrieves the name of the default database for a Connection object.
public String getDefaultDatabase();
Returns a string that is the name of the default database.