Reputation: 11
I'm handling a loan monitoring system project, and in this project customer details will be saved in a text file with a row for each customer like:
sri chennai 10000 asda casca 08989
From the customer details a project officer needs only the third field (that is amount of loan) and he uses that to calculate installment rate of interest which will be written to another file.
How can I extract just the needed information from the file?
Upvotes: 0
Views: 174
Reputation: 328614
Use BufferedReader
to read the file line by line. Use String.split()
or String.substring()
to locate fields. Write the result to a new file using the IO classes.
Upvotes: 1
Reputation: 26418
Read the file line by line and get the substring between second and the third space.
Please work on explaining the question properly.
Upvotes: 2