1
Mutoo 2014-05-03 10:44:58 +08:00 1
someclass 里面要实现自己的 String toString() 方法。
|
2
davidli 2014-05-03 19:11:30 +08:00 1
引用一段官方API里的内容
public static String deepToString(Object[] a) Returns a string representation of the "deep contents" of the specified array. If the array contains other arrays as elements, the string representation contains their contents and so on. This method is designed for converting multidimensional arrays to strings. 这个deepToString( ) 只是保证array中的array也被toString( ). 一个object默认的toString( )好像是 return getClass().getName() + "@" + Integer.toHexString(hashCode()); 所以要自己overload一个toString( )出来 |