[Java] Integer.valueOfï¼127ï¼== Integer.valueOfï¼127ï¼ã¯çãï¼ Javaã«ã¯æé©åã®ãããªãã¸ã§ã¯ãããã£ãã·ã¥ãããã¸ãã¯ãããã¾ãããã£ãã·ã¥ãã¸ãã¯ã¯ãã¢ããªã±ã¼ã·ã§ã³ã®ããã©ã¼ãã³ã¹æ¹åã«å½¹ç«ã¡ã¾ãããæå³ããªãçµæãçºçããããã¨ãããã¾ããããã«ã¯ãªãã£ã«ã«ãªé害ç¶æ³ã®åå ã«ããªãã¾ãã Naresh Joshiã®[Java Integer Cache â Why Integer.valueOf(127) == Integer.valueOf(127) Is True]ã®ããã°è¨äºå 容ãç´¹ä»ãã¾ããJava Integer Cacheã«ã¤ãã¦èãã¦ã¿ã¾ãããã ã¤ã³ã¿ãã¥ã¼ã§ã次ã®ãããªè³ªåãåãã¾ããã Integer a = 127; Integer b = 127; ä¸ã®ãããª2ã¤ã®Integerãªãã¸ã§ã¯ããããã¾ãã aÂ
{{#tags}}- {{label}}
{{/tags}}