This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi vivek, you have used the readUTF() method of the DataInputStream. this reads the text which is only in the UTF format.Hence you are getting an EOFException.Try saving a text file in the UTF-8 format(this is one of the options while saving a text file,the default is ansi) and read it.It works that way. But i don't know how to create a file in that format using the File object. please correct me if i am wrong.. bye.