+ 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

9th Dec 2019, 3:00 PM
Priyanshu Rai
Priyanshu Rai - avatar
3 ответов
+ 1
Just like Taste mentioned, if you want to do it on a single line then- Arrays.toString(array_name)
9th Dec 2019, 7:01 PM
Avinesh
Avinesh - avatar
+ 3
Arrays.toString should do right
9th Dec 2019, 3:10 PM
Taste
Taste - avatar