Answer:
A PrintWriter reference variable named output that references a PrintWriter object is as follows:
//PrintWriter output = new PrintWriter(outfile);
PrintWriter output = new PrintWriter("output.txt");
The statement that writes the string "Hello World" to the file output is as follows:
//output.print(message)
output.print("Hello World");
Step-by-step explanation: