java - Error replacing '+' , '-' , '*' , '/' -


what have put replace "+"?

if (msg.contains("+")){         msg.replace("+", "###%sum%###"); } 

string immutable in java:

msg = msg.replace("+", "###%sum%###"); 

replace() not modify msg, instead returning new string object.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

git - Possible to change Gitlab repository creation schema? -