java - Java中的List.of()生成什么类型的列表
问题描述
Employee john = new Employee("John", "Brown", 32, 100);
Employee camila = new Employee("Camila", "Smith", 25, 101);
Employee pat = new Employee("Pat", "Hanson", 23, 102);
List<Employee> employeeList = List.of(john, camila, pat);
List
方法生成什么类型List.of()
。是一个ArrayList
还是一个LinkedList
?
解决方案
推荐阅读
- javascript - 被 JS for 循环输出弄糊涂了
- java - 为什么我的查询返回 empry 列表并且没有给出错误?Java Spring Jpa 存储库
- dictionary - AutoHotkey - 使用字典/查找来替换热字串
- python - 微软合作伙伴生成令牌
- npm - 节点gyp重建不断失败
- javascript - 在滚动时移动 DomElements 时进入滚动循环
- html - 固定和中心导航栏
- reactjs - MUI异步自动完成和react-hook-form:表单无法访问自动完成值
- r - 在控制台输出的小标题中显示所有列
- r - 将带有 dna 序列的 csv 文件转换为带有 rstudio 和 biostrings 的 fasta 格式