Generic ArrayList declaration simple questions
in
Programming Questions
•
1 year ago
Two similar questions in one.
- ArrayList<type> happy = new ArrayList<type>();
- ArrayList<type> happy = new ArrayList(); // no repeat of <type>
- List<type> happy = new ArrayList<type>(); // List
seems to me to work as good as
- ArrayList<type> happy = new ArrayList<type>(); // ArrayList
Are there differences?
1