How to modify characters in a string in Java? -


Assume that we have the string t

why the following does not work Does:

 for  (int i = 0; i & lt; t.length; t ++) {t.charAt (i) + = 3; }  

If you are talking about Java, then that's because The operator is an assignment operator and you will attempt to assign a value to return a value from a method call.

Instead of trying to manipulate the string instead of this, and that is the manipulation that then


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -