Hai,
When we print the object of the class like System.out.print(new Class()) default constructor of that class
will be called.. And toString() method also will be called.. Can anyone explain me what s reason behind tat??
When we print the object of the class like System.out.print(new Class()) default constructor of that class
will be called.. And toString() method also will be called.. Can anyone explain me what s reason behind tat??