// 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 Pair<T> {
    private T a;
    private T b;
    public Pair(T a, T b) {
        this.a = a;
        this.b = b;
    }
    public String toString() {
        return "Pair of " + a.getClass().getSimpleName();
    }
    public static void main(String[] args) {
        System.out.println(new Pair<Integer>(1, 2));
        System.out.println(new Pair<Double>(1.2, 3.4));
        System.out.println(new Pair<String>("AB", "CD"));
    }
}
