Java - Insrting double quotes into a string
Posted on 2011-09-29
I have a java String variable, and I want to concatenate double quotes to the beginning and end of the string like this:
String x = "SomeValue";
x = """" + x + """";
That is what I have tried, but it does not work. When I am finished, the value of x should no longer be the literal string SomeValue, but SomeValue enclosed in double quotes.