Do I have to close FileOutputStream which is wrapped by PrintStream?

前端 未结 5 1733
醉话见心
醉话见心 2020-12-05 07:43

I\'m using FileOutputStream with PrintStream like this:

class PrintStreamDemo {  
    public static void main(String args[]) { 
            


        
5条回答
  •  Happy的楠姐
    2020-12-05 08:32

    No. It is not require to close other components. when you close stream it automatically close other related component.

提交回复
热议问题