I just want to know, we usually close streams at the end, but why don’t we close System.out PrintStream with System.out.close()?
I just want to know, we usually close streams at the end, but why
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you close it you will no longer be able to write to the console, so let’s leave this task to the VM when the process terminates. You should only close streams that you own or have manually created.
System.outis out of your control, so leave it to the creator to take care of.