The following noGood method gives a compilation error because it omits the formal type parameter immediately before the return type T.
public static T noGood(T t) {
return t;
}
Could somebody please help me understand that why is it required for a static generic method to have a type parameter before the return type? Is it not required for a non-static method?