Created
October 12, 2015 01:07
-
-
Save dallaslu/90f45eab290a2214e8be to your computer and use it in GitHub Desktop.
This file contains 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
public static void main(String[] args) throws Exception { | |
Class<?> cache = Class.forName("java.lang.Integer$IntegerCache"); | |
Field field = cache.getDeclaredField("cache"); | |
field.setAccessible(true); | |
Object value = field.get(null); | |
Array.set(value, 130, 3); | |
Integer result = 1 + 1; | |
System.out.println("1 + 1 = " + result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment