Results 1 to 2 of 2
Thread: Scanning a txt file with Java?
- 11-01-2012, 11: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, 11:53 PM #2
- By mwalstra in forum Advanced JavaReplies: 4Last Post: 10-28-2014, 12:57 PM
- By aw249 in forum New To JavaReplies: 3Last Post: 02-03-2012, 06:16 PM
- By jmwalloh in forum New To JavaReplies: 8Last Post: 03-24-2010, 01:33 PM
- By Waqas in forum Advanced JavaReplies: 1Last Post: 07-10-2009, 09:38 AM
- By thomase in forum New To JavaReplies: 20Last Post: 04-07-2009, 04:04 AM