This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You're using as separator 3 a's (aaa) so when it begins the search it uses the first 3 a's, the string before this would be an empty string. It removes those 3 a's and now search using "aaaaaabb". It does that with the other aaa's until the last string is aaab. Using split gives 2 tokens: an empty string and "bb". Try compiling this:
The code you provided doesn't compile, please check your syntax before posting. This is the correct code with an added line so it's better to see what happens here. The regex you use is the same as "aaa".