`
beyondsky
  • 浏览: 2251 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表

Integer

Integer i = 100; Integer j = 100; Integer m = new Integer(100); Integer x = 200; Integer y = 200; System.out.println(i == j); System.out.println(i == m); System.out.println(x == y); 为什么i==j是true;x==y是false? 解答:有些primitive值会被unbox成常量、不可变的wrapper对象,-127到127之间的值是不可变的wrapper类型,虚拟机对i和j使用了同样的对象实例及内存 ...
<?php $myStr = 789696;                       // An integer. $myVar = 2;                            // Another integer. $myStr = "This is my favorite band: "; // Strings are more fun. $myStr = $myStr . "U" . $myVar;        // Doing this is OK, too. echo "$myVar\n"; ?&g ...
Global site tag (gtag.js) - Google Analytics