I\'m using FileOutputStream with PrintStream like this:
FileOutputStream
PrintStream
class PrintStreamDemo { public static void main(String args[]) {
No. It is not require to close other components. when you close stream it automatically close other related component.