Skip to content

Instantly share code, notes, and snippets.

@katychuang
Last active January 10, 2020 14:40
Show Gist options
  • Save katychuang/fca2a6ff1697b920cc9de8a3dec5343d to your computer and use it in GitHub Desktop.
Save katychuang/fca2a6ff1697b920cc9de8a3dec5343d to your computer and use it in GitHub Desktop.
CISC 3130 Spring 2020 OER Code Snippets for https://libguides.brooklyn.cuny.edu/cisc3130/
double[] a; // 1. declare the array with a name
a = new double[n]; // 2. create the array
for (int i = 0; i < n; i++) // 3. elements are indexed from 0 to n-1
a[i] = 0.0; // initialize all elements to 0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment