If I am printing an object of the class then it is printing the toString() method implementation even I am not writing the toString() method so wha
In java object class is super class to the each and every class.whenever your passing parameter to the system.out.println internally object class to string method will be excuted.it returns class name@reference value given but as per our application requirement object class to string method will override in collection and string class.it returns their content.