Java面试必问:ThreadLocal终极篇 淦!

Java93

开场白

由于最近天气炎热,张三心情不好,所以他决定出去面试,与面试官聊天,解决问题。结果,在简历递交后,面试就安排好了。

[En]

Zhang San is not in a good mood because of the hot weather recently, so he decided to go out for an interview to chat with the interviewer and solve the problem. As a result, an interview was arranged just after the resume was delivered.

我弄丢了。为什么有人在交货后要求我面试?嘿…真烦人。哥哥在江湖上已经很久了。江湖上还有一个关于他的传说。我还这么受欢迎吗?太心烦意乱了,英俊又天真。

[En]

I lost it. Why did someone ask me for an interview just after the delivery? Hey... It's really annoying. Brother has not been in the Jianghu for so long. There is still a legend about him in the Jianghu. Am I still so popular? Too upset, handsome and innocent.

暗自窃喜的张三来到了某东现场面试的办公室,我丢,这面试官?不是吧,这满是划痕的Mac,这发量,难道就是传说中的架构师?

张三的心理突然崩溃了。他在第一次面试中遇到了一位顶级面试官。谁能忍受。

[En]

Zhang San's mentality suddenly collapsed. He met a top interviewer in his first interview. Who can stand it.

我丢?这TM是人话?这是什么逻辑啊,说是问多线程然后一上来就来个这么冷门的ThreadLocal?心态崩了呀,再说你TM自己忘了不知道下去看看书么,来我这里找答案是什么鬼啊...

尽管十分不情愿,但是张三还是高速运转他的小脑袋,回忆起了ThreadLocal的种种细节...

面试官说实话我在实际开发过程中用到ThreadLocal的地方不是很多,我在写这个文章的时候还刻意去把我电脑上几十个项目打开之后去全局搜索ThreadLocal发现除了系统源码的使用,很少在项目中用到,不过也还是有的。

我说我很少用它。还有人问我\

[En]

I said that I rarely use it. I was also asked,

面试官你好,其实我第一时间想到的就是Spring实现事务隔离级别的源码,这还是当时我大学被女朋友甩了,一个人在图书馆哭泣的时候无意间发现的。

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长