Skip to content

Instantly share code, notes, and snippets.

@jwalgemoed
Last active May 20, 2018 08:50
Show Gist options
  • Save jwalgemoed/7e60f1e8b3626047be2616142eb3eb59 to your computer and use it in GitHub Desktop.
Save jwalgemoed/7e60f1e8b3626047be2616142eb3eb59 to your computer and use it in GitHub Desktop.
// 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