Question: What is the error in readFile()? public void readFile(){ FileInputStream fbStream = null; Scanner inFS = null; int value = 0; fbStream= new FileInputStream(data.txt);
What is the error in readFile()? public void readFile(){ FileInputStream fbStream = null; Scanner inFS = null; int value = 0; fbStream= new FileInputStream("data.txt"); InFS-new Scanner(fbStream); value inFS.nextInt(): System.out.println("Value: "+value); fbStream.close(); a. There is a data input mismatch Ob.readFile() does not throw IOException OinPS is not closed Od. The code has no errors
Step by Step Solution
3.48 Rating (148 Votes )
There are 3 Steps involved in it
Answer public void readFile FileinputStream fbStreamnull Scanner inF... View full answer
Get step-by-step solutions from verified subject matter experts
