Hi Saheed
First of all, if i violate any of the JavaRanch policies by dropping my Data.java's constructor and also my read() method for your advice and tips, pls remove appropriately and i apologise;
This is dangerously close to having all code removed, however I have decided to leave it for now.
I think you have far too much code posted for getting many comments - it just becomes too much for others to read and make comments on. You would be better breaking it down to smaller sections. While I got rid of many methods and variables that were not germaine to your desired discussion on the read() methods and the constructor, it could have been pared down even further. Probably it would have been best to have a post that only discussed the constructor (and only had those methods and variables necessary for that discussion), then another post that only discussed the read method with a comment that global variables are initialized in the constructor (possibly with a pointer back to the original
thread).
I don't think there is much value in having both a Javadoc comment
and an inline comment:
Speaking of dbName - why is it a global variable? Do you use it outside of the constructor and it's associated openDataFile() method?
Your read() method has a very small window of oportunity for a record to be deleted between the validation of the record and the conversion back into a
String[].
Regards, Andrew