In JDK 8, compiler suggests to omit this
ArrayList<String> someList = new ArrayList<String>();
To this
ArrayList<String> someList = new ArrayList<>();
Marking the second String
as redundant.
However, compiler does not complain even if the diamond operator is completely omitted like this
ArrayList<String> someList = new ArrayList();
And this does not seem to create any issues during runtime. Are there any concrete differences between having a diamond operator and not having? If anyone could elaborate I'd really appreciate it.