+ 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 Respuestas
+ 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