// 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 NumFun {
    public static class Demo<T extends Number> {
        public boolean gt(T a, T b) {
            return a.doubleValue() > b.doubleValue();
        }
    }
    public static void main(String[] args) {
        Demo<Double> dd = new Demo<>();
        System.out.println(dd.gt(1.0, 0.0));
        System.out.println(dd.gt(1.0, 1.0));
        System.out.println(dd.gt(0.0, 1.0));
        Demo<Integer> di = new Demo<>();
        System.out.println(di.gt(1, 0));
        System.out.println(di.gt(1, 1));
        System.out.println(di.gt(0, 1));
    }
}
