フリー問題

Java SE 21 Developer Professional のフリー問題 20 / 20 問目

問題文

Which statement about the three standard streams of System is correct?

選択肢

  1. All three are PrintStream instances, and the input one simply throws when a write is attempted on it.
  2. The output one is buffered and flushed only when the program ends normally, so output produced before an uncaught exception is always lost.
  3. All three are Reader and Writer instances, so characters are decoded and encoded without any additional wrapper being needed.
  4. The input one is an InputStream while the output and error ones are PrintStream instances, so reading typically needs a wrapper that decodes characters.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。