// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class SuperTrick {
    public static void main(String[] args) {
        System.out.println(new C(true, 2));
    }
}

class P {
    private int v;
    public P(int v) {
        this.v = v;
    }
    public String toString() {
        return ("v=" + v);
    }
}

class C extends P {
    public C(boolean add, int v) {
        super(add ? up(v) : down(v));
    }
    public static int up(int v) {
        return (v + 1);
    }
    public static int down(int v) {
        return (v - 1);
    }
}
