Question: Question 1 4 What are the first three lines printed to the console? public static void main ( String args ) { } scannerTest (

Question 14
What are the first three lines printed to the console?
public static void main(String args){
}
scannerTest();
public static void scannerTest(){
try {
Scanner scanner = new Scanner(new File("input.txt"));
String[] line = scanner.nextLine().split(",");
System.out.println(line[1]);
System.out.println(scanner. next());
scanner. nextLine();
System.out.println(scanner.nextLine().split(",")[0]);
}catch(Exception ex){
}
System.out.println("Exception!");
}
Contents of input.txt
Data, Row1, Row2, Row3
avery, 20,30,40
alice, 15,20,30
hatter, 29,19,21
 Question 14 What are the first three lines printed to the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!