hello, i wanna build a PHONEBOOK DIRECTORY and I'm having a hard time using the file-handling. How can I build a file that can be updated retrieved? How can I search an entry and add entry from/to my directory using the same one file? HELP!
posted 13 years ago
What have you tried so far? What have you thought to do? Luckily, writing and reading a text file from a Java program is not difficult. Following is a simple example program that writes "hello" to a file named "Foo.txt" (which is also created if it doesn't already exist). This program then reads in a line of text from the same file and prints that line of text to the console.Getting any ideas? Post some simple code of what you're working on. Note: When posting code, please be sure to surround the code with the [code] and [/code] UBB Tags. This will help to preserve the formatting of the code, thus making it easier to read and understand.