Question: * Write a static method named removeDoubleSpaces * It should take a String as a parameter representing one or more sentences * It should return
Write a static method named removeDoubleSpaces
It should take a String as a parameter representing one or more sentences
It should return a String representing the input modified as follows:
Where a sentence ends in a full stop followed by two or more spaces, reduce the number of spaces to one
Only remove extra spaces that follow a full stop
eg "Hello. World." should become Hello. World.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
