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 = 

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

1 Expert Approved Answer
Step: 1 Unlock

Answer public void readFile FileinputStream fbStreamnull Scanner inF... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!