Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJeff Wereb
2,883 PointsWhat method are we overriding?
Can someone please explain what method we are overriding? It looks to me we are overriding Treet. How does this work?
Babatunde Idahor
3,416 PointsWe are overriding the toString() method - an object has a String representation. We use the toString() method to override that String representation from that object class. That way we can customized how the String representation is shown from our class. Keep in mind that he toString() is a subclass of the Object Class.
João Albuquerque
1,642 PointsJoão Albuquerque
1,642 PointsIn fact we are overriding the .toString () method, which is available in any class created in java. As the .equals () method etc.