Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.reflect.Field;
- public class Foo {
- static {
- try {
- Integer three = 3;
- Field value = Integer.class.getDeclaredField("value");
- value.setAccessible(true);
- value.setInt(three, 4);
- } catch (NoSuchFieldException | IllegalAccessException ignored) {
- }
- }
- public static void main(String... args) {
- Integer three = 3;
- Integer four = 4;
- System.err.println(three.equals(four));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement