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 -

c - Why would PK11_GenerateRandom() return an error -8023? -