Write a statement that declares a PrintWriter reference variable named output and initializes it to a reference to a newly created PrintWriter object associated with a file named "output .txt". (Do not concern yourself with any possible exceptions here- assume they are handled elsewhere.)
  • PrintWriter output=new PrintWriter(outfile);
  • new PrintWriter(output)
  • PrintWriter output = new PrintWriter("output.txt");
  • PrintWriter output = new PrintWriter("textfile.txt");
Given an initialized String variable output, write an expression whose value is a reference to a newly created PrintWriter object associated with a file whose name is contained in output. (Do not concern yourself with any possible exceptions here-- assume they are handled elsewhere.)
  • PrintWriter output = new PrintWriter("output.txt");
  • PrintWriter output=new PrintWriter(outfile);
  • String logfileName;
  • new PrintWriter(output)
Declare a local variable output that is suitable for referring to an object that provides methods for writing to a text file.
  • String logfileName;
  • PrintWriter output = new PrintWriter("textfile.txt");
  • PrintWriter output = new PrintWriter("output.txt");
  • PrintWriter output=new PrintWriter(outfile);
Write an expression whose value is a reference to a newly created PrintWriter object associated with a file named "output .txt". (Do not concern yourself with any possible exceptions here- assume they are handled elsewhere.)
  • new PrintWriter(output)
  • new PrintWriter("output.txt")
  • PrintWriter output=new PrintWriter(outfile);
  • PrintWriter output = new PrintWriter("output.txt");
Declare a variable logfileName that is suitable for holding the name of a file.
  • new PrintWriter(output)
  • String logfileName;
  • PrintWriter output = new PrintWriter("textfile.txt");
  • myFile = new File ("input.dat");
0 h : 0 m : 1 s

Answered Not Answered Not Visited Correct : 0 Incorrect : 0