Question: Code example 9 - 1 import java.io . * ; public class TestFileReader { public static void main ( String [ ] args ) {
Code example
import java.io;
public class TestFileReader
public static void mainString args
try BufferedReader in new BufferedReader
new FileReaderatxt
String line inreadLine;
while line null
String v line.split::;
String lname v;
String fname v;
String dept v;
System.out.printlnfname lname dept dept;
line inreadLine;
catch FileNotFoundException e
System.out.printlnFile not found.";
catch IOException e
System.out.printlnIO error.";
Refer to code example What will happen if the file named atxt doesnt exist?
Group of answer choices
The application will print IO error. to the console.
The application will print File not found. to the console.
The application will print dept to the console.
The application will crash and print a stack trace to the console.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
