I have an application in which some text (that includes int and double values) to certain file. How can I view a text file. I tried with RandomAccessFile by writing the text and numbers using WriteInt and WriteDouble methods etc. But when I tried to view the text file..it displays all the junk with some characters as *...and etc. Can any one please help me.. Neelima.
Thank you Rahul, I tried using FileOutputStream and RandomAccessFile as you have specified. I also tried the examples that you have given. But, it gives a compile time error as "Invalied character Constant", at the place of single quote. i.e., at the place of write('10'). Neelima
Neelima , the Write method is overloaded in many ways. Please check up the documentation for this. it takes a char, a char array etc..But it does not take a string. Please note that '10' is not a valid character but '1' and '0' are.
continuing on this topic, how would I write a newline character to a text file, a character like 's', I can cast off to int and proceed but I am stuck at a newline character.