0
Drag and drop from the options below to read and print the content of the file a.txt, and then close it.
try { File f = new File("a.txt"); Scanner sc = new (f); while (sc.hasNext()) { String a = .next(); String b = sc.(); System.out.println(a + " " + b); } sc.(); } catch (Exception e) { System.out.println("Error"); }
4 Answers
+ 4
Scanner
sc
next
close
0
methods missing in your code
0
Scanner
sc
next
close
0
Scanner
sc
next
close