I want to add a "\" character for each line in the list of lines ... I am doing something like this, but instead adds 2 backslashes.
feedbackMsgs.add(behaviorName+"\\"+fbCode);
looks like this: "abc\\def"
"abc\\def"
how to make sure one backslash is added?
It looks like your behaviourName ends with \ or fbCode starts with one.
behaviourName
\
fbCode
I just ran the program with the following -
String s = "test" + "\\" + "test2"; System.out.println(s);
And he prints the following:
test\test2
Are you sure there are no variables in the behaviourName or fbCode variables?
Try to write / print the behaviorName fbCode and find it yourself!
behaviorName
System.out.println(behaviorName); System.out.println(fbCode);
Source: https://habr.com/ru/post/891006/More articles:Perl - How to find a hash key if you know the value? - perlIt is better / more efficient to use subqueries or SELECT statements in a WHERE clause (in MS Access) - sqlJavascript: detect when a window is fully loaded - javascriptInitializing a component throws a null-reference exception - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/891005/is-there-something-analogous-to-springs-transactional-annotation-available-in-java-ee-6&usg=ALkJrhifJDSSJX3IWXHxTSN5dfoAit2Afw[Error]: update Heroku client to latest version - ruby-on-railsAndroid video quality? - androidSimple implementation for detecting loops in a directed graph in C # - c #Checking if a string has balanced parentheses - ruby ββ| fooobar.comatoi () with other languages ββ- c ++All Articles