I wrote the following piece of code.
public class ArrayLessons {
public static void main(String[] args) {
int values[] = { 1, 2, 3, 4, 5, 6 };
for (int i = 1; i < values.length; i++) {
System.out.println(values);
}
}
}
But the output puts some junk values like this "[I@5df9aeda"
.
Why it is not showing 1, 2, 3, 4, 5, 6
?
Im very very new to programming and java. So please guide me. Thanks.