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:
Verified
Q46: Which String class method will remove spaces
Q47: Which of the following statements about white
Q48: Select an expression to complete the following
Q49: Consider the following code snippet: Scanner in
Q52: The _ method of the Character class
Q52: Assuming that inputFile is a Scanner object
Q53: When reading words using a Scanner object's
Q54: Assume that inputFile is a Scanner object
Q55: Consider the following code snippet: Scanner in
Q56: Assume that inputFile is a Scanner object
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents