Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Classic declaration
ArrayList<Integer> list = new ArrayList<Integer>();
// But honestly, since Java 7 Java we can use the diamond operator <> (or omit it entirely)
ArrayList<Integer> list = new ArrayList();
// Var declaration
var list = new ArrayList<Integer>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment