Question: Write the Java filter Erase.java, which reads a sequence of integers of standard input and deletes duplicate repetitions. So if the input is 2 2
Write the Java filter Erase.java, which reads a sequence of integers of standard input and deletes duplicate repetitions. So if the input is 2 2 4 8 8 8 8 2, then the output is 2 4 8 2. Note that only repeated numbers that are side by side are deleted. You can assume that your input has at least one number. Then use this filter along with the filter sort, which is built in Windows / Mac OS / Linux to deliver unique integers from the file numbers.txt. Show a screenshot of running with the top output values.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
