Arrays in Java


Arrays store multiple values in a single variable.

Source Code

int[] numbers = {2, 4, 6, 8, 10};
for(int i = 0; i < numbers.length; i++) {
    System.out.println(numbers[i]);
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments