Answers for "for loop print array in java"

10

how to print array elements in java

import java.util.Arrays;

public class Array {

    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5};

        System.out.println(Arrays.toString(array));
    }
}
Posted by: Guest on March-29-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language