Ask Question

Given a PrintWriter reference variable named output that references a PrintWriter object, write a statement that writes the string "Hello, World" to the file output streams to.

+3
Answers (1)
  1. 22 April, 09:49
    0
    output. write ("Hello, World")

    Explanation:

    A printWriter object (An instance of a class) is contained in a variable called output, to access the write method we use the dot (.) operator to access the write method of the output object and hence, output. write () outputs any string it takes as argument. this is a very interesting OOP (Object oriented programming concept).
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Given a PrintWriter reference variable named output that references a PrintWriter object, write a statement that writes the string "Hello, ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers