Question: Java Given the following declarations: String message = Greetings!; PrintWriter output = new PrintWriter(myfile.txt); Write a statement that writes the string referenced by message to
Java
Given the following declarations:
String message = "Greetings!";
PrintWriter output = new PrintWriter("myfile.txt");
Write a statement that writes the string referenced by message to the file referenced by output.
Please explain.
Don't copy and paste other answers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
