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...
I have been doing that. I have now got it to get the correct number of words. The number of integers and floats is what I can't get nor the invalid ones. Can you actually look at my code and see what...
I have done everything. Been spending multiple hours figuring ways to debug it and have it print the correct amount for each one. Do you think my methods are not checking the integers, floats, and...
Sorry my mistake, it is suppose to be
Yeah! That's my problem. I'm still trying to play around with my code but still not getting correct results.
I told you, "The number of integers in the file is 64 and the number of words is 29 the number of floats is 3"
But this is wrong so my code isn't correctly counting them right. Which is what I...
The number of integers in the file is 64 and the number of words is 29 the number of floats is 3
>
Need this thread deleted. No longer need help.