List<?> can be assigned a List of any type.
But List<T> must be assigned a List of type T. Since we do not know if at runtime, type T will be String or any other type, we cannot return ArrayList<String> from a method that is declared to return List<T>.
The above code will give compilation error "Type mismatch: cannot convert from ArrayList<String> to List<T>" reason being T might vary at run time and
would not be equal to return type List<T> always, the correct syntax would be as mentioned below
This code will give compilation error "Cannot instantiate the type ArrayList<?>" reason being. if meth3 is called from any function,by no means wild character (?) in the return statement would be replaced by a valid object. As we know that wild character (?) does not represents any specific object, the compilation error completely make sense.
The possible correction of this might be as follows -