当前位置:网站首页>Learn to record and analyze
Learn to record and analyze
2020-11-08 15:22:00 【Irving the procedural ape】
Learn to record and analyze
Record the difficulties in learning , A little white !
I have not read the source code , Pure Xiaobai , I wrote this article just to improve myself !!! I hope you can point out the mistakes .
Curious, I looked through Integer.valueOf() Method source code
public static Integer valueOf(int i) { if (i >= IntegerCache.low && i <= IntegerCache.high) return IntegerCache.cache[i + (-IntegerCache.low)]; return new Integer(i); }
First of all, the parameters explain :
static final int low = -128;static final int high;static final Integer[] cache;static Integer[] archivedCache;
high No assignment , So we continue to track down high attribute
static { int h = 127; // If you specify -Djava.lang.Integer.IntegerCache.high=XXX( Enter your own data ) Parameters // The following statement will be executed , Then dynamic settings h yes 127 Or set the input data String integerCacheHighPropValue = // The method is by passing a key, Get the value set manually at startup VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); if (integerCacheHighPropValue != null) { try { h = Math.max(parseInt(integerCacheHighPropValue), 127); // // public static int max(int a, int b) { // return (a >= b) ? a : b; // } // Maximum array size is Integer.MAX_VALUE //32 Bit system 2147483647=2^32 h = Math.min(h, Integer.MAX_VALUE - (-low) -1); } catch( NumberFormatException nfe) { // If the property cannot be parsed into an int, ignore it. } } // find high The value of the property is determined by h Local attribute assignment high = h; // Load IntegerCache.archivedCache from archive, if possible VM.initializeFromArchive(IntegerCache.class); int size = (high - low) + 1;// Can be saved 256 Number . // As for why 256? I'm not going to talk about , Suggest yourself to search the computer storage data related concepts ! // Use the archived cache if it exists and is large enough.........
版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢
边栏推荐
- 10个常见的软件架构模式
- 阿里云视频云技术专家 LVS 演讲全文:《“云端一体”的智能媒体生产制作演进之路》
- Leancloud changes in October
- Android Basics - check box
- 原创 | 数据资产确权浅议
- Share the experience of passing the PMP examination
- Golang ICMP协议探测存活主机
- Shell uses. Net objects to send mail
- Essential for back-end programmers: distributed transaction Basics
- Implementation of verification code recognition in Python opencv pytesseract
猜你喜欢

大龄程序员没有出路吗?

我用 Python 找出了删除我微信的所有人并将他们自动化删除了

Python基础语法

Flink from introduction to Zhenxiang (7. Sink data output file)

Tight supply! Apple's iPhone 12 power chip capacity exposed

打工人,打工魂,抽终身会员,成为人上人!

这次,快手终于比抖音'快'了!

后端程序员必备:分布式事务基础篇

一文剖析2020年最火十大物联网应用|IoT Analytics 年度重磅报告出炉!

Alibaba cloud accelerates its growth and further consolidates its leading edge
随机推荐
后端程序员必备:分布式事务基础篇
非常规聚合问题举例
GopherChina 2020大会
喝汽水,1瓶汽水1元,2个空瓶可以换一瓶汽水,给20元,可以多少汽水
How to write a resume and project
小米、OPPO在欧洲市场继续飙涨,小米更是直逼苹果
大龄程序员没有出路吗?
华为在5G手机市场占据绝对优势,市调机构对小米的市占出现分歧
How to solve the difference between NAT IP and port IP
Google's AI model, which can translate 101 languages, is only one more than Facebook
Apache Kylin远程代码执行漏洞复现(CVE-2020-1956)
谷歌开源能翻译101种语言的AI模型,只比Facebook多一种
How to solve the conflict when JD landed on Devops platform?
Improvement of rate limit for laravel8 update
The first open source Chinese Bert pre training model in the financial field
Is there no way out for older programmers?
Elasticsearch learning one (basic introduction)
Golang ICMP Protocol detects viable hosts
啥是数据库范式
Share the experience of passing the PMP examination