I saw sometimes a type object inside <> beside of another object type declaration. For instance:
NavigableMap<Double, Integer> colorMap = new TreeMap<Double, Integer>()
or
private final CopyOnWriteArrayList<EventListener> ListenerRecords =
new CopyOnWriteArrayList<EventListener>();
Could you give me an easy explication?
They're known as generics in java, and templates in C++.
http://java.sun.com/developer/technicalArticles/J2SE/generics/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With