Write a program that reads lines from a file and prints


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 theclass that housed yourprogram 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 thestring John.

Yourprogram should get thearguments from the command line.
SAMPLE RUN #1: java RmvText going input Interactive Session Input File: input Standard Error (empty) Standard Output Hide InvisiblesHighlight: NoneStandard Input OnlyPrompts OnlyStandard Output w/o PromptsFull Standard OutputAllShow Highlighted Only
I'm·to·the·market.
How's·it?
Things·are·great.
You'd·better·get!

 

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program that reads lines from a file and prints
Reference No:- TGS02386207

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)