Aside from the printed materials for the console, what other use have you found for the toString () method for your objects?
It makes convenient debugging help when you just want to quickly view the contents of an object.
I use it for debugging purposes only . For functional requirements, I always implement a well-named method, for example String toExportFormat().
String toExportFormat()
, , , . toString() - , , . , , . toString() - .
toString()
, Swing.
, - , FAR , toString().
Source: https://habr.com/ru/post/1744385/More articles:shouldAutorotateToInterfaceOrientation & UINavigationController - objective-cCustomizing WPF Commands from Multiple View Models - wpfWPF - Byte array for Hex View (similar to Notepad ++ HEX-Editor plugin) - c #Google Chrome extension - javascriptHow do castings really work at the CLR level? - c #how to disable JList select change event and trigger it only when double clicked? - javaПреобразовать устаревший код java в общий - как заменить объект на тип? - javaWhat are the key concepts for developing Objective-C / Cocoa? - objective-cXml with spaces like InnerText - c #CInt (Long) in VB.NET behaves differently in 32- and 64-bit environments - vb.netAll Articles