Write a program that reads lines from a file and prints them out, removing all occurrences of a specified string from the lines.

Write a program that reads lines from a file and prints them out, removing all occurrences of a specified string from the lines.

LANGUAGE: Java

CHALLENGE:

Write a program that reads lines from a file and prints them out, removing all occurrences of a specified string from the lines.
For example, if the class that housed your program was called Exercise12_11, running this prompt on the command line:
java Exercise12_11 John filename
Would print out the contents of the file filename without any instances of the string John.
Your program should get the arguments from the command line.
SAMPLE RUN #1: java RmvText going input
Hide Invisibles
Highlight: Show Highlighted Only
I’m·to·the·market.↵
How’s·it?↵
Things·are·great.↵
You’d·better·get!↵

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level