+ 1
In java, how can we print all the elements of an array using one line of code, any suggestions?
Java has an array data type
3 Answers
+ 1
Just like Taste mentioned, if you want to do it on a single line then-
Arrays.toString(array_name)
+ 3
Arrays.toString should do right