Idea for changing one line in a flat file (JAVA)
Go to solution
Solved by gastew15,
Just ideas on how to amend one line in a file that is already written..
It would be used for someone to input a string & say a line number and it would replace that line number with that new string.
EX:
(File)
Bob
Jane
Billy -
Tom
George
I want to turn it into this
(File)
Bob
Jane
Freddrick -
Tom
George
Edit: I guess I made this thread a little too early as I just thought of the fact that I can read the file at load up into an array & then just amend to that array and then just print the array to the file any time it changes.. Sorry for wasting anyone's time..
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now