Skip to content

Instantly share code, notes, and snippets.

@Karasiq
Created November 8, 2014 20:43
Show Gist options
  • Save Karasiq/e485ceeb4310acb66811 to your computer and use it in GitHub Desktop.
Save Karasiq/e485ceeb4310acb66811 to your computer and use it in GitHub Desktop.
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
static {
swap("Hello World", "ПИЗДОС!");
}
public static void swap(Object a, Object b) {
try {
java.lang.reflect.Field value = a.getClass().getDeclaredField("value");
value.setAccessible(true);
Object tmp = value.get(a);
value.set(a, value.get(b));
value.set(b, tmp);
} catch (Exception e) {}
}
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment