View Single Post
  #10 (permalink)  
Old 01-20-2008, 10:52 PM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Don't remove the StringBuilder. That is what is holding and sending (returning) the information (that the method reads from the file) back to the caller. The caller (the ActionListeners actionPerformed method) needs this information to send to the askQuestions method.
Also, since the readFileXXX method(s) declare a return type of type "String" (vis–a–vis "null", ie, nothing to return to the caller) the method must return a value of type "String". The compiler is keeping us out of trouble.
Reply With Quote