I\'m confused a bit. I couldn\'t find the answer anywhere ;(
I\'ve got an String array:
String[] arr = [\"1\", \"2\", \"3\"];
then
Arrays.toString(arr);
output is [1,2,3] and you storing it to your string . and printing it so you get output [1,2,3].
If you want to get output 123 try this:
public static void main(String[] args) {
String[] arr= {"1","2","3"};
String output ="";
for(String str: arr)
output=output+str;
System.out.println(output);
}
Output:
123