+ 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
Quente hoje
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
help
0 Votes
AI
2 Votes
APIs
1 Votes