Concatenating elements in an array to a string

前端 未结 19 2342
慢半拍i
慢半拍i 2020-12-08 02:43

I\'m confused a bit. I couldn\'t find the answer anywhere ;(

I\'ve got an String array:

String[] arr = [\"1\", \"2\", \"3\"];

then

19条回答
  •  一个人的身影
    2020-12-08 02:52

    take a look at generic method to print all elements in an array

    but in short, the Arrays.toString(arr) is just a easy way of printing the content of a primative array.

提交回复
热议问题