Java SE 11 Developer (1Z0-819) — Question 131

Which statement is true?

Answer options

Correct answer: A

Explanation

Option A is correct because PrintWriter is designed to handle characters and includes automatic flushing capabilities. Option B is incorrect as System.exit() does not call close() on streams; it simply terminates the Java Virtual Machine. Option C is misleading; while Console.readPassword() obscures the input, it does not encrypt it. Option D is incorrect because PrintStream can handle both bytes and characters.