What is the difference in the two following declarations of an ArrayList?
ArrayList<Integer> nunbers = new ArrayList<Integer>();
vs
ArrayList<Integer> nunbers = new ArrayList<>();
Is one of them preferred over the other?
See Question&Answers more detail:os