Java: split() returns [Ljava.lang.String;@186d4c1], why?

后端 未结 3 1390
陌清茗
陌清茗 2020-12-18 12:04

And i have no idea why!

I bascially have a STRING (yes, not an array), that has the following contents:

[something, something else, somoething, trall         


        
3条回答
  •  时光取名叫无心
    2020-12-18 12:43

    The output

    [Ljava.lang.String;@186d4c1
    

    is the way java prints a string array (or any array) by default (when converted to a string). You may use

    Arrays.toString(urlArr)
    

    to get a more readable version.

提交回复
热议问题