class GenericBase<T> {
private T baseVariable;
public T get() {
return baseVariable;
}
public void set(T t){
baseVariable = t;
}
}
class GenericSubTwo<T, V> extends GenericBase<T>{
private V subVariable2;
public V get2(){
return subVariable2;
}
}
public TestClass{
public static void main(String[] args){
GenericBase<Integer> sub2 = new GenericSubTwo<>();
}
}
Is it true that diamond operator in this situation actually make new GenericSubTwo<Integer, Integer>(); or maybe something else.. I do not understand what is going on, because in GenericSubTwo I need two parameters..