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!↵

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,