Arrays.toString()
打印數(shù)組的方法,小地方,卻老忘記,來(lái)自FindBugs的提示:
The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array.
Arrays提供一系列接收不同類(lèi)型數(shù)組作為參數(shù)的toString方法
The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array.
Arrays提供一系列接收不同類(lèi)型數(shù)組作為參數(shù)的toString方法
String[] array = new String[]{"a","b","c"};
System.out.println(Arrays.toString(array));
System.out.println(Arrays.toString(array));
posted on 2009-08-17 15:17 cerulean 閱讀(1180) 評(píng)論(0) 編輯 收藏 所屬分類(lèi): Java