Making use of the MongoDB connector and the data type "class java.util.ArrayList" efficiently

Also note that the date you highlighted as being in a particular string format is not quoted. Meaning, it isn't a string. It is likely an actual date object that was stringified by your print operation, and therefore you cannot see its real nature.

Don't convert objects to and from strings unless you absolutely have to, or you are displaying to a user, or parsing user input. You should never be parsing the result from a database. MongoDB or otherwise.

1 Like