Abstract Data Types
Outline
Review from lab ??
Generics - Wildcards and limitations
List<String> ls = new ArrayList<String>;
List<Object> lo = ls;
X
This has ramifications for parameter passage.
http://java.sun.com/docs/books/tutorial/extra/generics/wildcards.html
Bounded wildcards to allow only collections of a particular family of objects.
An example:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/ArrayList.html
Your turn
Thinking about the storage of collections; how do we build the "data space" for a Sack.
Warehouse analogy.
CS 239 - Spring 2010
Department of Computer Science
Nancy Harris Home Page
Current Classes Link