I need to add a special character to a string as follows..

String ok = "I am the man"+specialChar;

However, when I print "ok" later,without taking substring, I just want to see

"I am the man "

with the special character but will be invisible and will have just a space.

The reason I want to do this is because I want to distinguish the regular strings with the strings invisible special character.

How can I do this? Any help would be greatly appreciated.


Will String.replaceAll do for you?