Answers for "what if we print array in java by println"

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
2

how to print an array in java

System.out.println(Arrays.toString(arr));
Posted by: Guest on January-05-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language