Created
April 21, 2021 20:38
-
-
Save armando-couto/c96fb4067793a521f1cd44069e3a08ba to your computer and use it in GitHub Desktop.
Como no Java fazer 2 + 2 é igual a 5. https://codegolf.stackexchange.com/questions/28786/write-a-program-that-makes-2-2-5/28818#28818
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
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