当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Flink from introduction to Zhenxiang (7. Sink data output file)
- STM32CubeIDE下载安装-GPIO基本配置操作-Debug调试(基于CMSIS DAP Debug)
- 华为在5G手机市场占据绝对优势,市调机构对小米的市占出现分歧
- Suitable for C / C + + novice learning some projects, do not give me to miss!
- 【Python 1-6】Python教程之——数字
- How to make a correct summary for 7 years?
- How to cooperate with people in software development? |Daily anecdotes
- AQS analysis
- 我用 Python 找出了删除我微信的所有人并将他们自动化删除了
- This year's salary is 35W +! Why is the salary of Internet companies getting higher and higher?
猜你喜欢
后端程序员必备:分布式事务基础篇
Workers, workers soul, draw lifelong members, become a person!
Arduino ide build esp8266 development environment, slow file download solution | esp-01 make WiFi switch tutorial, transform dormitory lights
Stm32uberide download and install - GPIO basic configuration operation - debug (based on CMSIS DAP debug)
关于update操作并发问题
On the confirmation of original data assets
Major changes in Huawei's cloud: Cloud & AI rises to Huawei's fourth largest BG with full fire
啥是数据库范式
基于阿里云日志服务快速打造简版业务监控看板
我用 Python 找出了删除我微信的所有人并将他们自动化删除了
随机推荐
Implementation of verification code recognition in Python opencv pytesseract
基于阿里云日志服务快速打造简版业务监控看板
金融领域首个开源中文BERT预训练模型,熵简科技推出FinBERT 1.0
后端程序员必备:分布式事务基础篇
Flink from introduction to Zhenxiang (10. Sink data output elasticsearch)
Arduino IDE搭建ESP8266开发环境,文件下载过慢解决方法 | ESP-01制作WiFi开关教程,改造宿舍灯
Returning to the third place in the world, what did Xiaomi do right?
On DSA of OpenGL
The birth of a new integrated memory and computing chip is conducive to the application of artificial intelligence~
. net large data concurrency solution
[Python 1-6] Python tutorial 1 -- number
Examples of unconventional aggregation
区块链周报:数字货币发展写入十四五规划;拜登邀请MIT数字货币计划高级顾问加入总统过渡团队;委内瑞拉推出国营加密交易所
阿里云视频云技术专家 LVS 演讲全文:《“云端一体”的智能媒体生产制作演进之路》
svg究竟是什么?
Drink soda, a bottle of soda water 1 yuan, two empty bottles can change a bottle of soda, give 20 yuan, how much soda can you
wanxin finance
Gopherchina 2020 Conference
AQS analysis
适合c/c++新手学习的一些项目,别给我错过了!