Java TOPIC 18 – GENERICS LESSON WORK QUESTION 1
Note:
You can easily base yourself on the example in the lesson. QUESTION 2
(IF TIME PERMITS) Below
are some built-in generic classes that create data structures. The value of T represents the type of data
that will be stored in the structure. LinkedList<T> HashMap<T> TreeMap<T> Try creating
one of the above structures with Integer objects. Can figure out how to add some data into
them? |
|