当前位置:网站首页>经典的一道面试题,涵盖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.
边栏推荐
猜你喜欢

【批处理DOS-CMD命令-汇总和小结】-输出/显示命令——echo

Eight misunderstandings, broken one by one (final): the cloud is difficult to expand, the customization is poor, and the administrator will lose control?

2022 love analysis · panoramic report of it operation and maintenance manufacturers
![[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,](/img/d1/b7e70e6f0be8e128f38afbe7ac927c.png)
[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,

即构「畅直播」,全链路升级的一站式直播服务

Redis transactions

(原创)自定义Drawable

After working in a large factory for ten years with an annual salary of 400000 yuan, I was suddenly laid off. If the company wanted to abandon you, it wouldn't leave any kindness

Blind survey shows that female code farmers are better than male code farmers

多网络设备存在时,如何配置其上网优先级?
随机推荐
八大误区,逐个击破(终篇):云难以扩展、定制性差,还会让管理员失去控制权?
正确的理解MySQL的MVCC
我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!
Experience record of Luogu's topic brushing
C# 解决使用SQLite 的相对路径问题
The IPO of Yefeng pharmaceutical was terminated: Yu Feng, the actual controller who had planned to raise 540million yuan, made P2P investment
Redis master-slave replication and sentinel mode
lvgl 说明3关于lvgl guider的使用
JVM层次上的对象的创建过程和内存布局
L'enquête en aveugle a montré que les femmes étaient meilleures que les hommes.
05 observer mode
关于放大器失真的原因你了解多少呢?
MySQL环境变量配置的教程
[11. two dimensional difference]
[batch dos-cmd command - summary and summary] - map folder to virtual disk - subst
The 6th Blue Bridge Cup
IO管脚配置和pinctrl驱动
(原创)自定义Drawable
直接修改/etc/crontab 文件内容,定时任务不生效
UE5神通--POI解决方案

