We have a class called Car, which contains brand, color and maximum speed. We create an instance of the Car class named anyCar and add arguments to the constructor.
We write the instance named anyCar in the document. Now we try to open the page and see that the toString method only shows the Object object for the anyCar instance.
So now we uncomment our written toString method, in which we return the values we want to display.
We will try to run the page again and see that the rewritten toString method now displays the properties of the anyCar instance with a text description. That is, exactly as we entered it in the toString function.