Tuesday, 27 August 2013

How can I add escape characters to a java String?

How can I add escape characters to a java String?

If I had a string variable:
String example = "Hello, I'm here";
and I wanted to add an escape character in front of every ' and " within
the variable, how would I do that?

No comments:

Post a Comment