I've been working on basic Java programs for classes, however, I like to look ahead and learn new things independent of the class.
While I was looking at ArrayLists in Java, I noticed that I could do the following, and both seem to work,
ArrayList<String> var = new ArrayList<String>();
While the following also runs, without my IDE giving any warnings or errors,
ArrayList<String> var1 = new ArrayList<>();
Thus I am confused as to why the second set of chevrons exist, it doesn't seem to make a difference in the code.
Any and all help is appreciated!