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.)

2
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.)

LANGUAGE: JAVA

CHALLENGE:

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.)

SOLUTION:

new PrintWriter("output.txt")

2 comments

  • MarlonRando33 says:

    /* 21194 – 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.)
    */
    new PrintWriter(“output.txt”)

  • UnicornBaby4 says:

    /* 21194 – 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.)
    */
    new PrintWriter(output)

Add comment