3 ms·
Yeah, I got my first exposure to the dynamic side of Java half a year ago. Its honestly not that difficult to deal and the shit it can do is pretty silly.
by kazagistar 11y ago
Yeah, I got my first exposure to the dynamic side of Java half a year ago. Its honestly not that difficult to deal and the shit it can do is pretty silly.
Field field = instance.getClass().getDeclaredField("secretField");
field.setAccessible(true);
System.out.println("The old private value is " + field.get(instance) + " but lets change it!");
field.set(instance, "new value");