Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Insert the missing code in the following code fragment. This fragment is intende

ID: 3830661 • Letter: I

Question

Insert the missing code in the following code fragment. This fragment is intended to read an input file named detain.txt and write to an output file named dataOut. txt Explain your answer public static void main (String[] args) throws FileNotFoundException {string inputFileNme = "dataIn.txt"; String OutputFileName = "dataOut.txt"; File input file = _____ Scanner in = new Scanner (input File)} Assuming that inputFile is a Scanner object to read words from a text fill, fill in an expression to complete the following code segment, which counts number of words in the input file. Explain your answer. int count = 0; while (inputFile.hasNext ()) {String word = _____ count++;} System.out.printIn (count); Insert the missing code in the following code fragment. This fragment is intended to read all words from a text file. Explain your answer. File input File = new File (*dataIn.txt"); Scanner in = new Scanner (dataIn.txt); while (_____) String input = in.next(); System.out.printIn (input);

Explanation / Answer

[2] File inputFile = new File("datain.txt");
[3] String Word = inputFile.nextLine();
[4] while(in.hashNextLine())