Skip to content

Instantly share code, notes, and snippets.

@briantliao
Created January 2, 2019 20:53
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 briantliao/89e4a1852ac4c62a9c3f42f44ff3e6de to your computer and use it in GitHub Desktop.
Save briantliao/89e4a1852ac4c62a9c3f42f44ff3e6de to your computer and use it in GitHub Desktop.
// declarations
int a;
int[] b;
Car toyota;
// we "declare" b as an array of integers, then "instantiate" a new array of integers with size 10 and "assign" it to b.
int[] b = new int[10];
// we "declare" toyota as a Car, then "instantiate" a new Car object and "assign" it to toyota.
Car toyota = new Car();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment