Can we print object name in Java?

Example 1: Java program to print the object When we print the object, we can see that the output looks different. This is because while printing the object, the toString() method of the object class is called. … Test – name of the class. @ – joins the string.

Sizin İçin Seçtik  How do you create a string method in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *