Writing a toString Method in Java

preview_player
Показать описание
0:07 - What is a toString method
1:25 - Example object with its string representation
2:20 - Tips for writing a toString
3:24 - An example class to write a toString for
4:35 - Printing objects with no toString method (default toString)
5:00 - Printing the state of an object without using a toString
5:30 - Automatically generating a toString using Eclipse
6:00 - Editing the toString - generating a complete sentence
6:58 - A simpler toString, letting the client add additional information with an accessor method
7:55 - An example of why a toString method should not print anything out
Рекомендации по теме