This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| connect-src 'self' | |
| blob: | |
| https://*.pscp.tv | |
| https://*.twimg.com | |
| https://*.video.pscp.tv | |
| https://aa.twitter.com | |
| https://aa.x.com | |
| https://accounts.google.com/gsi/ | |
| https://ads-api.twitter.com | |
| https://ads-api.x.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.reflect.Constructor; | |
| import java.lang.reflect.Field; | |
| import java.util.Random; | |
| import sun.misc.Unsafe; | |
| public class RandomizedIntegerCache { | |
| public static void main(String[] args) { | |
| for (int i = 1; i <= 10; ++i) { | |
| Integer newValue = new Integer(i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| ) | |
| func main() { | |
| v := os.Args[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IntegerCompareBoundaryValueTest { | |
| public static void main(String[] args) { | |
| Integer a = 127; | |
| Integer b = 127; | |
| System.out.println(a == b); | |
| a = 128; | |
| b = 128; | |
| System.out.println(a == b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Classfile /Projects/gist/java/blog_integercache/IntegerCompare.class | |
| Last modified 2019/12/22; size 583 bytes | |
| SHA-256 checksum f65fb3e99ef730b1c8df6e1ccd7a1d68c9b2eeefdef036e6234cdd51ee11fcac | |
| Compiled from "IntegerCompare.java" | |
| class IntegerCompare | |
| minor version: 0 | |
| major version: 57 | |
| flags: (0x0020) ACC_SUPER | |
| this_class: #25 // IntegerCompare | |
| super_class: #2 // java/lang/Object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IntegerCompare { | |
| public static void main(String[] args) { | |
| Integer a = 100; | |
| Integer b = 100; | |
| System.out.println(a == b); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Classfile /Projects/gist/java/blog_integercache/IntCompare.class | |
| Last modified 2019/12/22; size 493 bytes | |
| SHA-256 checksum a4ee8895a66ef2c9b7395c1e5b354dc6efe95c1e0e3998d82ad60bea4f8cd580 | |
| Compiled from "IntCompare.java" | |
| class IntCompare | |
| minor version: 0 | |
| major version: 57 | |
| flags: (0x0020) ACC_SUPER | |
| this_class: #19 // IntCompare | |
| super_class: #2 // java/lang/Object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IntCompare { | |
| public static void main(String[] args) { | |
| int a = 100; | |
| int b = 100; | |
| System.out.println(a == b); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IntCompareTest { | |
| public static void main(String[] args) { | |
| int a = 100; | |
| int b = 100; | |
| System.out.println(a == b); | |
| a = 200; | |
| b = 200; | |
| System.out.println(a == b); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IntegerCompareTest { | |
| public static void main(String[] args) { | |
| Integer a = 100; | |
| Integer b = 100; | |
| System.out.println(a == b); | |
| a = 200; | |
| b = 200; | |
| System.out.println(a == b); | |
| } | |
| } |
NewerOlder