java - adding a single backslash to ArrayList<String> -
i have arraylist of strings storing values going print properties file. want append backslash end of each line can have multi-line values. put values in arraylist this:
arraylistname.add(value + '\\');
it produces "value\\" in arraylist ends 4 backslashes in file. this:
arraylistname.add(value + '');
produces "value", there no backslashes attached value. doing incorrectly?
if you're viewing data in debug, you'll see 2 backslashes.
but if print data out, there not 2 backslashes.
public static void main(string[] args) throws exception { string data = "value\\"; system.out.println(data); }
results:
value\
Comments
Post a Comment