In another SO post, the following example is given as a response to an OP:
public static <E> void funct1(final List<E> list1, final E something)
{
list1.add(something);
}
public static void funct2(final List<?> list, final Object something)
{
list.add(something); // does not compile
}
I have verified that funct1 compiles whereas funct2 does not. However, I am unable to figure out why.