I have a simple class named "Trida"
public class Trida {
public double[] append(double[] pole1, double[] pole2){
int length = pole1.length + pole2.length;
double[] pole3 = new double[length];
for (int i = 0; i < pole1.length; i++){
pole3[i] = pole1[i];
pole3[i + 1] = pole2[i];
}
return pole3;
}
public static void main(String[] args) {
Trida trida = new Trida();
double[] pole1 = {1.0, 3.0};
double[] pole2 = {2.0, 4.0};
System.out.println(trida.append(pole1, pole2));
}
When I run this code, terminal said [D@15db9742, but I want print field like that - [1.0, 2.0, 3.0, 4.0] Can you help me?