This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
My test main class allows user input to create one integer, which I've converted to a string, plus four strings representing details to be written to a file. When these details are written to the file they initially read correctly, eg:
111,hello one,hello two,hello three,hello four
The problem occurs when I try to write a second set if user entry values to this file. It is expecting four strings as words, and therefore reads and writes the above line as follows,
I have absolutely no idea why this is happening and would really appreciate some help or advice with this problem.
The current code for my test main class is as follows,
Any help or advice really appreciated at this stage!!
It is rather difficult to give a good reply, because your code is based on the classes like TitleList, SimpleReader and SimpleWriter, which are not part of standard Java.
Guessing at what SimpleReader and SimpleWriter are trying to do, I cannot see anything immediately wrong with your code. However, something must be wrong if you are seeing wrong behaviour, so we would need to see exactly what these other classes do. That might be too much code to post, though.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Joined: Nov 06, 2005
Thanks for the reply. SimpleReader and Writer allow basic reading in and out of files etc. My current code for the TitleList class is as follows,
The above class also uses the basic Title class which is as follows,