September 2011
Beginner
650 pages
15h 47m
English
In addition to generic classes and methods, you can also have generic interfaces. Generic interfaces are specified just like generic classes. Here is an example. It creates an interface called Containment, which can be implemented by classes that store one or more values. It declares a method called contains( ) that determines if a specified value is contained by the invoking object.


The output is shown here:
![]()
Although most aspects ...
Read now
Unlock full access