This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
When regex is "o" an empty string is created when "oo" is found in boo. Why is an empty string not found when the String splits on the last two "oo"?? In other words y is the array length 3 and not 4 with two empty strings?
When you call the split function with only one argument ,then it assumes that the second argument of the split function is zero. And when the second argument is zero then the pattern will be applied as many times as possible, the array can have any length, and trailing empty strings will be discarded. This is the reason why you are not seeing the trailing empty strings.