Generics
Note: Generics DO NOT take primitive data types as their parameter; use their wrappers:
Also Note: Wrapper classes are immutable.
"A class is immutable if is defines no mutator methods. This means that once the state of an object is initialized by a constructor, it will never change. String and the wrapper classes are all immutable."
Source: http://www.cs.cmu.edu/~pattis/15-1XX/common/handouts/glossary.html
Also please see this link about autoboxing.
- Integer for int
- Long for long
- Character for char
- Short for short
- Byte for byte
- Boolean for boolean
- Float for float
- Double for double
- Void for void
Please see the following:
- http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html
- http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf
- Generics FAQ
- Generics Tutorial by Sun