I am new to Java reflection. I am trying to make a program where addition of two numbers gives custom result. Below is the code:
public class MoreTest {
    public static void main(String[] args) {
        try {
            Field field = Integer.class.getDeclaredField( "value" );
            field.setAccessible( true );
            field.setInt(Integer.valueOf(2),2);             
        } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
            e.printStackTrace();
        }
        System.out.println( 2 + 4 ); // should print 8
    }
}
What I can do in the above code to print the output I need?
 
    