// 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 Ver {
    public static void main(String[] args) {
        FoobarV3 o = new FoobarImpl();
        o.dosomethingV1(1);
        o.dosomethingV2(1, 2);
        o.dosomethingV3(1, 2, 3);
    }
}

interface FoobarV1
{
    public void dosomethingV1(int a);
}

interface FoobarV2 extends FoobarV1
{
    public void dosomethingV2(int a, int b);
}

interface FoobarV3 extends FoobarV2
{
    public void dosomethingV3(int a, int b, int c);
}

class FoobarImpl implements FoobarV3 {
    public void dosomethingV1(int a) {
        dosomethingV2(a, 0);
    }
    public void dosomethingV2(int a, int b) {
        dosomethingV3(a, b, 0);
    }
    public void dosomethingV3(int a, int b, int c) {
        System.out.println(a + " " + b + " " + c);
    }
}
