simple return function: println("t="+t) gives "t=[I@620a3d3b" but println(t) gives the right result - WHY is this syntax not working here?
in
Programming Questions
•
6 months ago
hello guys - i try to understand why the syntax
println("t="+t) is not working in this context ......
THX pricessin
int[] vals = {10, 20, 30};
void draw() {
int[] t = timestwo(vals);
println("t="+t); // gives strange result: t=[I@620a3d3b
println(t); // gives right result
noLoop();
}
int[] timestwo (int[] dVals) {
for (int i = 0; i < dVals.length; i++) {
dVals[i] = dVals[i] * 2;
}
println(dVals);
return dVals;
}
1