Created
August 29, 2014 16:44
-
-
Save lb7n/78561a37e5ce0fe2a824 to your computer and use it in GitHub Desktop.
Making a Multi Dimensional Array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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