|
-
help with a java program
I need to create a program that will read names and phone numbers from a text file. I then need to search for a phone number by providing a last name, I will also need to be able to add a name and phone number and also be able to delete a name and a phone number.
Can anyone help me please?
This is what I have so far:
File file = new File("phones.txt");
try {
scanner = new Scanner(file);
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
System.out.println(line);
}//end of while
} catch (FileNotFoundException e) {
e.printStackTrace();
}
All this does is read from a text file and then print the names and phone numbers. I need to be able to search for similar last names in that text file and provide the full names and phone numbers for that last name. I really need help with this !!
Similar Threads
-
Replies: 9
Last Post: 09-19-2007, 05:58 AM
-
By SlickWilly440 in forum Java
Replies: 2
Last Post: 01-28-2006, 09:17 PM
-
By Rob Abbe in forum Talk to the Editors
Replies: 44
Last Post: 01-13-2003, 02:57 PM
-
By Lori Piquet in forum Talk to the Editors
Replies: 114
Last Post: 10-10-2002, 06:01 AM
-
By Glen Kunene in forum Talk to the Editors
Replies: 17
Last Post: 03-23-2002, 12:43 AM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks