Answer:
The missing code to create a PrintWriter object for the output file is:
c. new PrintWriter(outputFileName)
So the complete code fragment would be:
public static void main(String[] args) throws FileNotFoundException {
String inputFileName = "dataIn.txt";
String outputFileName = "dataOut.txt";
File inputFile = new File(inputFileName);
Scanner in = new Scanner(inputFile);
PrintWriter out = new PrintWriter(outputFileName);
// Rest of the code goes here
}
Step-by-step explanation: