当前位置:网站首页>经典的一道面试题,涵盖4个热点知识
经典的一道面试题,涵盖4个热点知识
2022-06-27 08:27:00 【C_x_330】
1.ConcurrentHashMap使用synchronized关键字保证线程安全
2.HashMap实现了Collction接口
3.Array.asList方法返回java.util.ArrayList对象
4.SimpleDateFormat是线程不安全的
A. JDK1.8 的 ConcurrentHashMap 采用CAS+Synchronized保证线程安全。 JDK1.7 及以前采用segment的分段锁机制实现线程安全,其中segment继承自ReentrantLock,因此采用Lock锁来保证线程安全。
B.
C. Arrays.asList() 返回 java.util.Arrays.ArrayList 对象,这里的 ArrayList 是 Arrays 私有的内部类
D.
边栏推荐
- 直接修改/etc/crontab 文件内容,定时任务不生效
- 多网络设备存在时,如何配置其上网优先级?
- If xn > 0 and X (n+1) /xn > 1-1/n (n=1,2,...), Prove that the series Σ xn diverges
- vim 从嫌弃到依赖(20)——global 命令
- 【原创】TypeScript字符串utf-8编码解码
- Code source AQS sous - jacent pour la programmation simultanée juc
- 若xn>0,且x(n+1)/xn>1-1/n(n=1,2,...),证明级数∑xn发散
- ZABBIX deployment instructions (server+win client + switch (H3C))
- RockerMQ消息发送与消费模式
- Mysql事务中MVCC理解超简单
猜你喜欢
SPARQL basic introductory exercise
多网络设备存在时,如何配置其上网优先级?
Lvgl description 3 about the use of lvgl Guide
L'enquête en aveugle a montré que les femmes étaient meilleures que les hommes.
参考 | 升级 Win11 移动热点开不了或者开了连不上
Matlab tips (19) matrix analysis -- principal component analysis
Ue5 magic power - POI solution
Persistence mechanism of redis
[batch dos-cmd command - summary and summary] - how to distinguish the internal command and external command of CMD, and the difference between CMD command and run (win+r) command,
Read datasets iteratively with xgboost
随机推荐
Persistence mechanism of redis
Redis的事务
MATLAB小技巧(18)矩阵分析--熵权法
Redis主从复制以及哨兵模式
力扣84柱状图中最大的矩形
100%弄明白5种IO模型
(原创)自定义Drawable
"Short video" Linxia fire rescue detachment carries out fire safety training
100% understanding of 5 IO models
JVM常见的垃圾收集器
[batch dos-cmd command - summary and summary] - how to distinguish the internal command and external command of CMD, and the difference between CMD command and run (win+r) command,
Helix QAC is updated to 2022.1 and will continue to provide high standard compliance coverage
第十一章 信号(一)- 概念
SQL Sever column name or number of supplied values does not match the table definition
Associated GIS: all roads lead to ue5 City
Analysis log log
使线程释放锁资源的操作/方法重载一点注意事项
Closure problem
ACM course term summary
[11. two dimensional difference]