hi im trying to put random letters into the array i created (only two letters 'x' and 'b' but they need to fill up the whole array) right now its just numbers between 0-9. does anyone know how to change them to letters, if so thanks! :)

my output is random but heres one:

8 6 8 3 4 1 9 6 6 3
0 0 7 7 4 2 8 3 0 3
3 5 7 0 4 1 4 1 0 0
5 2 7 4 3 9 6 2 6 1
6 0 4 3 6 6 4 3 0 0
1 8 8 5 8 1 4 5 9 8
8 8 7 8 7 9 5 8 4 5
5 3 2 2 2 3 6 7 8 2
9 7 4 1 1 2 0 9 1 6
0 9 1 6 1 1 0 7 0 1

but i want it to look like:

bbbbbbbbbb
bbbbbbbbbb
bbbbbbbbbb
bbbbbbbbbb
bbbbbbbbbb
bbbbbbbbbb
bbbxxxbbbb
bbbbxxxxbbb
bbbbbbxxxb
bbbbbbbbxb

1/3 x's and 2/3 b's

define the array as a char array instead of as an int array.

char[][] mychars = new char[10][10];
mychars[0][0] = 'x';

And if you're going to make new threads about the same topic, mark your other thread solved. Otherwise just keep posting in the other thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.