Collection<String> coll = new ArrayList<String>();
coll.add("asd1");
coll.add("asd2");
coll.add("asd3");
System.out.println(coll); //[asd1, asd2, asd3] ????????为什么集合打印的结果是这个
System.out.println("------------------");
int[] arr = {1,2,3,5,6,7,8,9};
System.out.println(arr); //[I@67064
System.out.println(Arrays.toString(arr)); //[1, 2, 3, 5, 6, 7, 8, 9]
|
|