Q:
What is the use of tostring() method?
Answer
If we print any object by using println() or print() methods.
The println() or print() methods internally calls tostring() method and prints the return value of toString() method.
View answer
Workspace
Report Error
Discuss