View Single Post
  #9 (permalink)  
Old 01-20-2008, 10:29 PM
mcal mcal is offline
Member
 
Join Date: Jan 2008
Posts: 39
mcal is on a distinguished road
Ok thanks a lot. Just one last problem. When i removed the string builder, now it is issuing a missing return statement. What is missing? And it is always displying the questions 2 times. First it displays the questions, and then for a second time it display them again. Thanks a lot. And i really have to thank you for your help. Thanks again. :-)

In this code:

Code:
private String[] readFile3(String path) { StringBuilder sb = new StringBuilder(); String separator = "\n"; DataInputStream in = null; try { in = new DataInputStream(new BufferedInputStream(new FileInputStream(dataFile3))); String desc; try { while (true) { desc = in.readUTF(); JOptionPane.showInputDialog(null, desc); sb.append(desc + separator); } } catch (EOFException e) { } } catch(IOException e) { System.out.println( e.getMessage() ); System.exit(1); } // here i think is a missing return statement }

Last edited by mcal : 01-20-2008 at 10:51 PM.
Reply With Quote