Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
Last active September 8, 2015 17:57
Show Gist options
  • Save mattintosh4/4bde4e0ffce42f6aa430 to your computer and use it in GitHub Desktop.
Save mattintosh4/4bde4e0ffce42f6aa430 to your computer and use it in GitHub Desktop.
public class cbccee4e {
public static void main(String[] args) {
int[] c1;
c1 = new int[3];
c1[0] = 1;
c1[1] = 2;
c1[2] = 3;
for (int i = 0; i < 3; i++) {
System.out.println(c1[i]);
}
int[] c2 = new int[3];
c2[0] = 1;
c2[1] = 2;
c2[2] = 3;
for (int i = 0; i < 3; i++) {
System.out.println(c2[i]);
}
int[] c3 = {1, 2, 3};
for (int i = 0; i < 3; i++) {
System.out.println(c3[i]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment