Solved

Insert the Missing Code in the Following Code Fragment

Question 97

Multiple Choice

Insert the missing code in the following code fragment. This fragment is intended to read all words from a text file. File inputFile = new File("dataIn.txt") ;
Scanner in = new Scanner(dataIn.txt) ;
While (____________)
{
String input = in.next() ;
System.out.println(input) ;
}


A) in.getNext()
B) in.peek()
C) in.hasNext()
D) in.nextWord()

Correct Answer:

verifed

Verified

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

Related Questions