Created
January 8, 2014 02:10
-
-
Save rtoal/8310544 to your computer and use it in GitHub Desktop.
Uses reflection to count like King Arthur with the Holy Hand Grenade
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.Field; | |
public class MontyPython { | |
public static void main(String[] args) throws Exception { | |
Field v = Integer.class.getDeclaredField("value"); | |
v.setAccessible(true); | |
v.set(3,5); | |
System.out.printf("Ready the holy hand grenade!\n"); | |
Thread.sleep(1000); | |
System.out.printf("%d\n", 1); | |
Thread.sleep(1000); | |
System.out.printf("%d\n", 2); | |
Thread.sleep(1000); | |
System.out.printf("%d\n", 3); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you aint seen anything yet:
http://www.crittersitextra.com/pettips/new_purdue_bloat_study.pdf