-2
Project scribble plus it didn’t print the numbers inside the []...
package tostring2;
import java.util.Arrays;
public class ToString2 {
public static String ToString2(int [] a) {
int idades [] = {12,20,30,40};
int i;
for (i = 0; i < 4 ; i++){
System.out.println(idades[i]);
}
for (i=0; i < idades.length;i++){
System.out.println("idades "+Arrays.toString(idades));
}
}
I was editing your question and I realized I was missing a key lock
}
. I don’t know if your source is like this, but if it is, it could be the cause of the mistake– rLinhares