java集合面试问题(三)
67. 什么是Arrays类的toString()方法?
int[] array = {1, 2, 3};
String arrayString = Arrays.toString(array); // 返回 "[1, 2, 3]"68. 什么是Arrays类的deepEquals()方法?
int[][] array1 = {{1, 2}, {3, 4}};
int[][] array2 = {{1, 2}, {3, 4}};
boolean areEqual = Arrays.deepEquals(array1, array2); // 返回 true69. 什么是System.arraycopy()方法?
int[] source = {1, 2, 3, 4, 5};
int[] target = new int[5];
System.arraycopy(source, 1, target, 2, 3); // 将 source[1] 到 source[3] 复制到 target[2] 到 target[4]70. 什么是Arrays类的fill()方法?
71. 什么是Arrays类的stream()方法?
72. 什么是Arrays类的parallelSort()方法?
73. 什么是Arrays类的mismatch()方法?
74. 什么是Collections类的frequency()方法?
75. 什么是Collections类的disjoint()方法?
76. 什么是Collections类的reverse()方法?
77. 什么是Collections类的shuffle()方法?
78. 什么是Collections类的min()和max()方法?
79. 什么是Collections类的addAll()方法?
80. 什么是Collections类的synchronizedXXX()方法?
81. 什么是Arrays类的spliterator()方法?
82. 什么是Collections类的newSetFromMap()方法?
83. 什么是Collections类的checkedMap()方法?
84. 什么是Collections类的emptyXXX()方法?
85. 什么是Collections类的singletonMap()方法?
86. 什么是Collections类的nCopies()方法?
87. 什么是Collections类的reverseOrder()方法?
88. 什么是Collections类的rotate()方法?
89. 什么是Collections类的replaceAll()方法?
90. 什么是Collections类的singleton()方法?
91. 什么是Collections类的enumeration()方法?
92. 什么是Collections类的indexOfSubList()和lastIndexOfSubList()方法?
93. 什么是Collections类的newXXX()方法?
94. 什么是Collections类的checkedSortedMap()方法?
95. 什么是Collections类的emptyIterator()和emptyListIterator()方法?
96. 什么是Collections类的fill()方法?
97. 什么是Collections类的unmodifiableCollection()方法?
98. 什么是Collections类的disjoint()方法?
99. 什么是Collections类的singleton()方法?
100. 什么是Collections类的synchronizedCollection()方法?
最后更新于
这有帮助吗?