Hi,
I have a problem with understanding the String split() method. I read the documentation but I cannot figure it out how this is
accualy working. If I use this code:
the result is:["a","a"]. Thus, I thought that this method splits the string removing delimiter.
Although when I run the follwing code:
The result is:["","","a","a","","aa","","a"]
..........index: 0 ..1 ..2 ...3 ..4 ...5 . 6 . 7
I dont understand why at the beggining of the output(index 0 and 1) as well as on index 4 when two "bb" letter were, the character "" appeared. It seems like those "bb"characters were replaced by "" but then why at the end of the result the "" is not appiring?The source string has to "bb" at the end as well.
I will be greatfull if somebody could explain me this.
Regards,
Kamila