I'm a novice in Java programming. I couldn't catch in the following case why I can't print an array by this line:
System.out.print(arr());
Instead of all of results I got this: '[D@60e1e567'
What did I do wrong?
public class test {
public static void main(String[] args) {
System.out.print(arr());
}
public static double[] arr() {
double res;
int count=0;
double[] anArray = new double[100000000];
int k=0;
for (int j=2;j<101;j++){
for(int i=2; i<101;i++) {
res=Math.pow(j,i);
anArray[k]=res;
k++;
}
}
return anArray;
}
}