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.

enter image description here

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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -