Integrate cache的易错点
来源:互联网 发布:童装淘宝店简介怎么写 编辑:程序博客网 时间:2024/06/08 16:47
public class Test{ public static void main(String[] args) { Integer a=100; Integer b=100; Integer c=new Integer(100); Integer d=new Integer(100); System.out.println(a==b);//true System.out.println(c==d);//false String e="a"; String f="a"; String i=new String("a"); String j=new String("a"); System.out.println(e==f);//true System.out.println(i==j);//false /** * */ Integer f1=127,f2=127,f3=128,f4=128; System.out.println(f1==f2);//true System.out.println(f3==f4);//false System.out.println(-f1==-f2);//true System.out.println(-f3==-f4);//true }}
简单地解释这段代码,就是如果传入的int在IntegerCache.low和IntegerCache.high之间,那就尝试看前面的缓存中有没有打过包的相同的值,如果有就直接返回,否则就创建一个Integer实例。
IntegerCache.low 默认是-128;IntegerCache.high默认是127.
阅读全文
0 0
- Integrate cache的易错点
- 我们在Continue Integrate的挑战
- sd integrate
- Continuously Integrate
- scipy integrate
- MASMPlus 是一个使用纯 MASM 编写的 MASM Integrate Develop Environment.
- OpenCV获取ARToolKit的图像数据 Integrate OpenCV and ARToolKit image
- ant and junit integrate
- integrate PhysicsEdit into cocos2d
- zend studio integrate cloud
- Eclipse Integrate with Python
- Integrate eclipse with python
- AngularJs integrate with Yii
- How to Integrate jVectorMap
- Integrate NSX into Neutron
- Webrtc Intro - OpenH264 Integrate
- python积分scipy.integrate
- GitHub integrate with Eclipse
- Java应用Tomcat执行过程之性能调优
- (整理总结)unity性能优化
- zabbix监控mongo数据库,数据空白段问题解决
- 关于elasticsearch属性not_analyzed,坑
- TextView属性大全
- Integrate cache的易错点
- java测试工具
- java 类、对象(实例)
- .net MVC 随笔4
- 20171108Link
- Hive 之 内部表和外部表区别
- is和==的区别
- 游戏场景概念设计教程之构图技巧讲解
- POJ 2151.Check the difficulty of problems