I've tried reversing them but it just gives me an error when I run it.
java.lang.ArrayIndexOutOfBoundsException: 5
at exam2.main(exam2.java:12)
at...
Type: Posts; User: Jsmooth
I've tried reversing them but it just gives me an error when I run it.
java.lang.ArrayIndexOutOfBoundsException: 5
at exam2.main(exam2.java:12)
at...
Prints out the opposite of what I need haha
A A A A A
B B B B B
C C C C C
D D D D D
E E E E E
F F F F F
G G G G G
H H H H H
I I I I I
For example,
for(int i = 0; i <alpha.length;i++){
for(int j = 0; j<alpha[0].length;j++) {
System.out.print(alpha[i][j] + " ");
}
System.out.println();...
I can not define the 2D array using that statement. I need to define it using loops...
This should be the outcome.
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
A B C...
Yeah that is how I want it. So that it looks like this
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E
Yes, I'm just looking for loops that will do that with the 2D array.
loops to store ‘A’ in the first row, 'B' in the second row, and so on, using the boundaries of [10][5] meaning 10 is the rows and 5 is the columns.
I am already using a 2d array of char [] []...
I need to figure out a way to print out the alphabet using a 2d array using char[][] alpha = new char[10][5]; .
It would look like this.
A B C D E
A B C D E
A B C D E
A B C D E
A B C D E...