Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

LANGUAGE:  JAVA

CHALLENGE:

One of the constructors for PrintStream class has a single OutputStream argument.
Assume that dos is a variable that references an OutputStream object.

Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

SOLUTION:


ps = new PrintStream(dos);