CompareObjects.java:9: error: method findLarger in class MyComparableUtil cannot be applied to given types; System.out.println("Larger objet is "+ util.findLarger(rect, cuboid)); ^ required: TwoDShape,TwoDShape found: Rectangle,Cuboid reason: actual argument Cuboid cannot be converted to TwoDShape by method invocation conversion where T is a type-variable: T extends MyComparable declared in class MyComparableUtil