Assuming that inputFile references a Scanner object that was used to open a file, which of the following statements will read an int from the file?

a. int number = inputFile.next();
b. int number = inputFile.integer();
c. int number = inputFile.readInt();
d. int number = inputFile.nextInt();


d. int number = inputFile.nextInt();

Computer Science & Information Technology

You might also like to view...

Which of the following represents the I-bar pointer?

A.
B.
C.
D.

Computer Science & Information Technology

The objects shown in the accompanying figure are drawing objects.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The sizes of pie slices are automatically adjusted when the underlying data values are changed

Indicate whether the statement is true or false

Computer Science & Information Technology

Is it possible to overcommunicate? For example, in Chapter 4 you learned to avoid leading questions, which might suggest an answer. Can you think of other examples, like newspaper headlines, where “less is more”?

What will be an ideal response?

Computer Science & Information Technology