fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. public class Main {
  6. static {
  7. swap("Hello World", "ПИЗДОС!");
  8. }
  9.  
  10. public static void swap(Object a, Object b) {
  11. try {
  12. java.lang.reflect.Field value = a.getClass().getDeclaredField("value");
  13. value.setAccessible(true);
  14. Object tmp = value.get(a);
  15. value.set(a, value.get(b));
  16. value.set(b, tmp);
  17. } catch (Exception e) {}
  18. }
  19.  
  20. public static void main(String[] args) {
  21. System.out.println("Hello World");
  22. }
  23.  
  24. }
  25.  
Success #stdin #stdout 0.07s 380224KB
stdin
Standard input is empty
stdout
ПИЗДОС!