posted 14 years ago
Lakmal,
List<Base1> : A list that holds elements of type Base1
List<T extends Base1> : A list that holds elements that are either of type Base1 or they extends Base1.class
When applied to class:
In the following abstract class there are two infer types, notice that the H extends Model is used and that the H is used in the abstract class
When a concrete class extends the abstract class the H will be "replaced" by the Hotel class
It is a good design aproach when you have to deal with common functionalities but you have to work with different implementations
Regards,
Nicolas
SCJP 6.0 , SBCD (Preparing..),
MSc Enterprise Systems Development, BSc Computer Science