Geeks With Blogs
Rahul Anand's Blog If my mind can conceive it, and my heart can believe it, I know I can achieve it. April 2013 Entries
Java behaves differently with string split compared to C#
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. ......

Posted On Tuesday, April 2, 2013 10:39 AM

Copyright © Rahul Anand | Powered by: GeeksWithBlogs.net