public static void flip( Pair< ? , ?
Object tmp = pair.first; pair.first = pair.second; // error: incompatible types pair.second = tmp; // error: incompatible types } } class Test { public static void test() { Pair,?> xmas = new Pair< String , Date >(“Xmas”,new Date(104,11,24)); Pair.flip(xmas); Pair,?> name = new Pair< String , String >(“Yves”,”Meyer”); Pair.flip(name); } }