In this java code
public class Gen<T> {
private Gen object; //line 1
public Gen(Gen object) { //line 2
this.object = object;
}
}
I could replace line 1 with Gen<T>
and line 2 with public Gen(Gen<T> object)
separately, thus coming up with 4 different scenarios.
What's the difference when Gen<T>
is used instead of Gen
in object references?