Closing I/O streams

What will be the problem if I do not close an I/O Stream. Say I have a FileOutputStream object "out" to write to a file. After I finish writing, I do not close the stream by calling out.close(). What will be the specific problem for this? Similarly what will be the problem if i do not close an input stream after reading from a file or any other source? Also what is the difference between not closing a file i/o stream and not closing a stream obtained from socket?

[474 byte] By [maitya] at [2007-11-26 18:23:50]
# 1
If you don't close FileOutputStreams, data usually won't be written to the file, so you'll probably want to close the streams. Other streams have different kinds of behaviour, leaving files open, taking system resources and all other stuff.So you want to close streams. Always.
-Kayaman-a at 2007-7-9 5:57:54 > top of Java-index,Java Essentials,Java Programming...
# 2
resource for I/O not release, if your application read too many file and that file not close after process, it will cauase IOException.
p_epia at 2007-7-9 5:57:54 > top of Java-index,Java Essentials,Java Programming...
# 3
...and other applications might not be able to read the file while you have it open.Kaj
kajbja at 2007-7-9 5:57:54 > top of Java-index,Java Essentials,Java Programming...