Hi All: What happens if we try to read a file created with "r" in the argument and the file doen't exist.If we try to write a IOException will be thrown under these conditions. -Thanks [ January 15, 2002: Message edited by: Arsho, Ayan ]
The mode argument must either be equal to "r" or "rw", indicating that the file is to be opened for input only or for both input and output, respectively. The write methods on this object will always throw an IOException if the file is opened with a mode of "r". If the mode is "rw" and the file does not exist, then an attempt is made to create it. An IOException is thrown if the file argument refers to a directory.