Hi!
I am creating a desktop Java application using Netbeans. My task is to generate an array and than sort it (InsertSort, SelectSort, BubbleSort).
My question is how do I show the value of all elements from generated array into the textfield?
What i have tried to do is:
Random R = new Random();
String arrayLength = arrayLength_TF.getText();
String randomValue = randomValue_TF.getText();
int a = Integer.parseInt(arrayLength);
int b = Integer.parseInt(randomValue);
int []array = new int[a];
for (int i=0; i< array.length; i++){
array[i]= R.nextInt(b);
}
String generatedArray = array.toString();
generatedArray_TF.setText(generatedArray);
Instead of getting the elements value i get value like this in my TextField: [I@1ea5671