Skip to content

Instantly share code, notes, and snippets.

@lb7n
Created August 29, 2014 16:44
Show Gist options
  • Save lb7n/78561a37e5ce0fe2a824 to your computer and use it in GitHub Desktop.
Save lb7n/78561a37e5ce0fe2a824 to your computer and use it in GitHub Desktop.
Making a Multi Dimensional Array
public class Mainclass {
public static void main(String[] args) {
int[]NUMBERS = new int [10];
int upperBound = 10;
int lowerBound = 0;
for(int i=0; i<10; i++) {
NUMBERS[i]=0;
}
for (int i=0; i<10; i++){
System.out.println(i);
}
int[][]NUMBERS2 = new int [10][10];
for (int i = 0; i<10; i++){
for (int j = 0; j<10; j++){
NUMBERS2[i][j] = 0;
}
}
for (int i = 0; i<10; i++){
for (int j = 0; j<10; j++){
System.out.print(NUMBERS2[i][j]);
}
System.out.println();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment