Coming from C# background I assumed certain behavior while using split() method on strings that no matter what the returned array will have delimiter count + 1 elements. And my assumption cost me few hours of debugging to fix a simple issue!! Java behaves differently with split() and provides many possible options configurable through second parameter. The default implementation of split() with single parameter assumes second parameter value as ‘0’, which means trailing empty elements are ignored. ......