Skip to content

Instantly share code, notes, and snippets.

@armando-couto
Created April 21, 2021 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armando-couto/c96fb4067793a521f1cd44069e3a08ba to your computer and use it in GitHub Desktop.
Save armando-couto/c96fb4067793a521f1cd44069e3a08ba to your computer and use it in GitHub Desktop.
import java.lang.reflect.Field;
public class IgualA5 {
public static void main(String[] args) throws Exception {
Class cache = Integer.class.getDeclaredClasses()[0];
Field c = cache.getDeclaredField("cache");
c.setAccessible(true);
Integer[] array = (Integer[]) c.get(cache);
array[132] = array[133];
System.out.printf("%d",2 + 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment