集合中有哪些 List?分别有什么特点?
Explain about the different lists available in the collection.
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: medium
分类: Collections
标签: List, ArrayList, Vector, LinkedList
参考答案摘要
答案 List 中的值按索引位置添加,因此是按索引有序的;允许重复元素。 ArrayList : 迭代快,随机访问快 是按索引有序(ordered),但不保证排序(not sorted) 实现 Random Access 接口 示例: public class Fruits{ public static void main (String [ ] args){ ArrayList
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。