Question: Write a java program dealing with file io. First ask the user for a file name including the path and then do the following methods:
Write a java program dealing with file io. First ask the user for a file name including the path and then do the following methods:
Replace all occurrences of a word with another word from the file. (ask the user what they want to replace and the result should be saved to a new file)
Remove all occurrences of a word from the file. (ask the user what they want to remove and the result should be saved to a new file)
Count the number of lines in a file. (should return an int)
Count the number of words in the file. (should return an int)
Count the number of characters in the file. (should return an int)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
