fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. import java.lang.reflect.Field;
  5.  
  6. class Ideone
  7. {
  8. static {
  9. try {
  10. Field VALUE = Integer.class.getDeclaredField("value");
  11. VALUE.setAccessible(true);
  12. VALUE.set(0, 3);
  13. } catch (ReflectiveOperationException e) {
  14. throw new Error(e);
  15. }
  16. }
  17.  
  18. public static void main(String[] args) {
  19. Integer a = 0;
  20. System.out.println( a );
  21. }
  22. }
Success #stdin #stdout #stderr 0.09s 48056KB
stdin
Standard input is empty
stdout
3
stderr
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by Ideone (file:/home/UJNczm/tested.zip) to field java.lang.Integer.value
WARNING: Please consider reporting this to the maintainers of Ideone
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release