Integer注意_享元设计模式
生活随笔
收集整理的這篇文章主要介紹了
Integer注意_享元设计模式
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
public class IntegerNote{
?public static void main(String[] args){
??Integer d1=100;
??Integer d2=100;
??System.out.println(d1==d2); //true
??Integer d3=129;
??Integer d4=129;?
??System.out.println(d3==d4);?//false
?}
}
/*
?究其原因則涉及到java設計中的一個設計模式,享元設計模式
*/
總結
以上是生活随笔為你收集整理的Integer注意_享元设计模式的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 摩尔庄园小镇怎么升级
- 下一篇: views 多个文件夹 netcore_