Suppose we wanted to process a text file called "input.txt" using the Scanner object. Which of the following lines of code correctly creates the necessary Scanner object?

a)```
Scanner inputFile = new Scanner("input.txt");
```
b)```
Scanner inputFile = new Scanner(new InputFile("input.txt");
```
c)```
Scanner inputFile = new Scanner(new File(input.txt);
```
d)```
Scanner inputFile = new Scanner(new InputFile(input.txt);
```
e)```
Scanner inputFile = new Scanner(new File("input.txt");
```

c)```
Scanner inputFile = new Scanner(new File(input.txt);
```

Computer Science & Information Technology

You might also like to view...

In a slide using Title and Content layout, press ________ to move the insertion point from the title placeholder to the text placeholder

A) Alt + Tab B) Ctrl + Tab C) Ctrl + Enter D) Alt + Enter

Computer Science & Information Technology

A Vista feature that enables you to enter characters that don't have an assigned key on the keyboard is ________

Fill in the blank(s) with correct word

Computer Science & Information Technology