This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a method that creates a bufferedreader and it suppose to return it to the calling class.
However I am having issues.
The method is held in what I call the DatabaseUtil class, in the final version of the program I will be connecting to a SQL database until then I am using a simple flatfile. So I want to keep connections, query, and linereading in the class. However I want the Factory to be able to loop through the fields that are returned
How can I get this to compile. The try block is hanging me up.
No guarantee in this reply, just re-learning Java, but it looks like your method should be returning a BufferedReader, yet you return a string. I guess you should be returning the BufferedReader instead.
Apologies if I'm wrong.
Joined: Oct 13, 2000
Duh, that wasn't right. You're assigning msgString to a BufferedReader, but how is msgString declared? What's the compiler message? Should be a BufferedReader?