I'm really new to java or programming, so i have a "basic" quesion (I guess). I have this code, which generates me an array of numbers. I want to convert that into an array of strings. Can someone please fix my code?
public class HelloWorld{
public static void main(String[] args) {
Number[][] values = new Number[10][12];
for (int i = 0; i < values.length; i++) {
for (int j = 0; j < values[i].length; j++) {
values[i][j] = Math.floor(Math.random() * 100000) / 100000;
System.out.print(values[i][j] + " ; ");
}
System.out.println();
}
}
}
Numbers afterwards? If not, just convert the number to a string as soon as you generate it an declarevaluesasString[][]. As an aside, why useNumberwhendoubleis more than adequate?