0
How split() works in Java ???
4 Respuestas
+ 5
You should print the array, then you will see it:
welcome@to@solo@learn
inside your array after split("@"):
[welcome, to, solo, learn] (that's why length = 4)
Another example:
String str = "hello world";
String[] arr = str.split(" ");
-> [hello, world]
+ 3
Btw: you askes this question twice
https://www.sololearn.com/Discuss/1808922/?ref=app
+ 3
It is the limit. You should read the article in kiRA post. There are some examples using positive and negative limit.
0
What does the second argument in the example code specifies???