Results 1 to 2 of 2
Thread: Scanning a txt file with Java?
- 11-01-2012, 10:41 PM #1
Member
- Join Date
- Nov 2012
- Posts
- 11
- Rep Power
- 0
Scanning a txt file with Java?
I know how to read a txt file in Java but what I dont know how to do is scan a txt file in java based on a starting value a user gives me.
For example: Say I have a txt file with a list from 1-20. ANd after each of those numbers is a answer to a math problem. Sure I can read it normally but how do I go about getting everything after that one number the user gave me? I just made this up below but you should get the idea.
A user inputs the number 1
The program scans the txt file for the first 1 that appears
The program then outputs the rest of the line after 1.
1. 5460
2. 8475
3. 4850
4. 9121
- 11-01-2012, 10:53 PM #2
Similar Threads
-
Scanning a Plain text file
By aw249 in forum New To JavaReplies: 3Last Post: 02-03-2012, 05:16 PM -
Scanning text file and inserting contents into array
By jmwalloh in forum New To JavaReplies: 8Last Post: 03-24-2010, 12:33 PM -
Scanning in java
By Waqas in forum Advanced JavaReplies: 1Last Post: 07-10-2009, 08:38 AM -
scanning a file and using more than one delimiter
By thomase in forum New To JavaReplies: 20Last Post: 04-07-2009, 03:04 AM -
Java Twain Scanning
By mwalstra in forum Advanced JavaReplies: 3Last Post: 12-09-2008, 11:49 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks