Skip to content

Instantly share code, notes, and snippets.

@prmichaelsen
Created August 13, 2019 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prmichaelsen/d7db72e5ab6e063657db1aa53704a67f to your computer and use it in GitHub Desktop.
Save prmichaelsen/d7db72e5ab6e063657db1aa53704a67f to your computer and use it in GitHub Desktop.
// creating an array of ints without generics
int[] myArray = new int[] {};
// creating lists for ints and strings, respectively
IntList myIntList = new IntList();
StringList myStringList = new StringList();
// creating a list for each using generics
List<int> myGenericIntList = new ArrayList<int>();
List<string> myGenericStringList = new ArrayList<string>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment