Solved

Assuming That InputFile Is a Scanner Object Used to Read

Question 71

Multiple Choice

Assuming that inputFile is a Scanner object used to read words from a text file, select an expression to complete the following code segment, which counts the number of words in the input file. Assuming that inputFile is a Scanner object used to read words from a text file, select an expression to complete the following code segment, which counts the number of words in the input file.    A) inputFile.nextString()  B) inputFile.nextDouble()  C) inputFile.next()  D) inputFile.nextInt()


A) inputFile.nextString()
B) inputFile.nextDouble()
C) inputFile.next()
D) inputFile.nextInt()

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions