+ 1

What is wrong with this code? It shows me a message [Ljava.lang.String;@15db9742

package aRirays; public class Program { public static void main(String[] args) { String names = " Pet, Lee, Tom, Edo"; String[] splitNames= names.split(", "); System.out.println(splitNames); } }

26th Jan 2017, 1:04 PM
E R
2 Respostas
+ 3
The way you want to print the array was wrong. Thats How it works ;) import java.util.Arrays; public class Program { public static void main(String[] args) { String names = " Pet, Lee, Tom, Edo"; String[] splitNames = names.split(", "); System.out.println(Arrays.toString(splitNames)); } }
26th Jan 2017, 1:12 PM
R4xx4r
R4xx4r - avatar
+ 2
Thank you for your quick response
26th Jan 2017, 1:14 PM
E R