This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Don't really understand your question. The <T> means that you will have to specify a class which you are using. It means whatever you pass to the constructor will be a particular type, not specified at the moment.
When you write Box<Integer> a = new Box<Integer>(); you call it " A Box object parameterized with Integer is created" But you have not initialized by passing value to its constructor as:
Box<Integer> box = new Box<Integer>(10); Now you have initialized the Box objects member variable with value 10, passed as constructor parameter.
Joined: Oct 13, 2005
The formal type parameter tells the compiler what sort of data this class will contain. The constructor parameter receives the actual value. The fact that the word "parameter" is used in different places to mean different things can be confusing.