I\'m writing a program that will replace multiple words in a single string. I\'m using this code but it is replacing word but giving result in two different lines. I want
Instead of using replace use replaceAll which worked for me
replace
replaceAll
String strOutput = inString.replaceAll("call me","cm").replaceAll("as soon as possible","asap");