I want to understand this concept:
T object - shared, will be deleted to the actual type.? object - will be erased by what?Object an object;
What is the difference between T, ?and Object?
I easily understand # 1, but what about:
Object var;
? var;
What is the difference between the two? I read that I cannot use ?explicitly, for example, Tor any other variable, and that it ?is related to objects, not types.
But what is the practical reason? Why can't I just write Listobjects ( List<Object>) instead of Listwildcards ( List<?>)? Since I do not know the types of objects in both cases.
Also, I would like to know what is erasing for ??