Array length after split | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Array length after split

Why array length = 3 https://code.sololearn.com/cEzP6U3oM0rO/?ref=app

29th Aug 2019, 6:11 AM
Sergiy L šŸ‡ŗšŸ‡¦
Sergiy L šŸ‡ŗšŸ‡¦ - avatar
2 Respostas
+ 1
I think it makes the rest of the string after the last dot which is "" as a place in the array
29th Aug 2019, 6:29 AM
Eliya Ben Baruch
Eliya Ben Baruch - avatar
+ 1
Add this to the end of the code and see the result: for (String s : a) System.out.println (s.equals ("")); The output will be: False False True
29th Aug 2019, 6:32 AM
Eliya Ben Baruch
Eliya Ben Baruch - avatar