Results 1 to 2 of 2
Thread: Scanning a txt file with Java?
- 11-01-2012, 10:41 PM #1Member
- Join Date
- Nov 2012
- Rep Power
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.
- 11-01-2012, 10:53 PM #2
- By aw249 in forum New To JavaReplies: 3Last Post: 02-03-2012, 05:16 PM
- By jmwalloh in forum New To JavaReplies: 8Last Post: 03-24-2010, 12:33 PM
- By Waqas in forum Advanced JavaReplies: 1Last Post: 07-10-2009, 08:38 AM
- By thomase in forum New To JavaReplies: 20Last Post: 04-07-2009, 03:04 AM
- By mwalstra in forum Advanced JavaReplies: 3Last Post: 12-09-2008, 11:49 AM