Generic { <T> T multiply(T a) { return a; }    }
@Test public void originTest() { System.out.println(gen.multiply(1, 1)); System.out.println(gen.multiply(1d, 1d)); System.out.println(gen.multiply(1f, 1f)); System.out.println(Math.sqrt((int) gen.multiply('1', '1'))); }
@Test public void genericTest() { System.out.println(gen.multiply(1).getClass()); System.out.println(gen.multiply(2f).getClass()); System.out.println(gen.multiply(3d).getClass()); }