Print int Array in Java


PHOTO EMBED

Saved by [deleted user] #java

nt[] intArray = { 7, 9, 5, 1, 3 };
System.out.println(Arrays.toString(intArray));
content_copyCOPY

Output will look like [7, 9, 5, 1, 3 ]

https://stackoverflow.com/questions/409784/whats-the-simplest-way-to-print-a-java-array