I couldn't locate a homework tag but this is HOMEWORK.
I am looking to randomly assign a value to each letter while separating them by a comma and must use an array in the answer.
Here is what I attempted so far but am still some way off.
double[] numbers = {5,4,6.2,1.5};
char[] letters = {'a','v','c',d'};
int temp = (int) (Math.random()*numbers.length);
int woo = (int) (Math.random()*letters.length);
for (int i = 0; i < letters.length; i++) {
for (int j = 0; j < numbers.length; j++){
System.out.print(letters[woo]);
System.out.print(numbers[temp]);
System.out.print(',');
}
}
I am hoping for an output of something like: d4, c1.5, v6.2, a5
Any help would be appreciated