I am having trouble understanding something about Generics in Schildt book on Java 5.0.
On page 31, he states that the types can be the same for a generic like this
TwoGen<String, String> x = new TwoGen<String, String>("A", "B"). Then he goes on to state "In this case, both T and V would be of type String. Of course, if the type arguments were always the same, then two parameters would be unnecessary."
I don't understand what is quotes. Any geniuses want to elaborate?
Joined: Jan 30, 2000
He's saying that if, when you design the class, you know that the two generic types will always be equal to each other, then you shouldn't design the class with two generic types - just use one.