0

Formatter and Scanner not outputting into a file

public static void addR(){ Scanner ip = new Scanner(System.in); System.out.printf("%s%n%s%n","Enter account num, fname, lname and balance.", "enter EOF indicator." ); while(ip.hasNext()){ try{ output.format("%d %s %s %.2f%n", ip.nextInt(),ip.next(),ip.next(),ip.nextDouble()); }catch(FormatterClosedException ex){ System.err.println("error writing to file"); break; }catch(NoSuchElementException ex){ System.err.println("Invalid input , try again"); ip.nextLine(); } System.out.print("? "); } // end while if(output!=null)output=null; } I opened the file with no errors but it don't write into the file

29th Mar 2019, 10:09 AM
Sara
Sara - avatar
1 Resposta
+ 2
Ok I understood , I can maybe help you , I found 12 error https://code.sololearn.com/cFV3x1Lgigy7/?ref=app
14th May 2019, 4:49 PM
( ͠° ͟ʖ °͠ )