// Abusing generics public class Test { public static E makeOne() { E x = (E) new Double(2.2); return x; } // Some real compiler abuse. public static void main(String[] args) { Integer one = Test.makeOne(); Double two = Test.makeOne(); Number three = Test.makeOne(); } }