Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (13.1k points)
Can anyone help me how can I able to use toString() function in Java? And what is it advantages?

1 Answer

0 votes
by (26.7k points)

Basically, the toString() function comes into play, when you want to represent any object as a string. Also, it will help you to make your code shorter by overriding the toString() method to the object class.

I hope this will help.

Want to know more about Java? Prefer this tutorial on Java Tutorial.

Want to become a Java expert? Join Java Course now!!

Related questions

0 votes
1 answer
asked Nov 4, 2019 in Java by Anvi (10.2k points)
0 votes
1 answer
0 votes
1 answer
asked Feb 25, 2021 in Java by rahulnayar01123 (6.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...