Getting this error. I ran it through the debugger and I see that it is taking an error on the second field billingUnit = record.substring(9,4);. See how the String is greater than the substring I am indexing. I don't understand how it is taking such an error.
public String substring(int beginIndex,
Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
Hope this helps...
Joined: Apr 21, 2009
I goofed up.
group = record.substring(0,9).trim();
billingUnit = record.substring(9,13).trim();
accountNumber = record.substring(13,20).trim();
enrollmentDate = record.substring(20,28).trim();
billingDate = record.substring(28,36).trim();
status = record.substring(36);