Backslash in java

前端 未结 4 1158
北海茫月
北海茫月 2021-01-21 13:57

I have a problem with strings saved in a database, like this for example: \"311\\315_316\\336_337\". They have only one backslash and this is a problem in java. Wh

4条回答
  •  时光说笑
    2021-01-21 14:59

    In java strings, the backslash character is a control character. If you wish to include a literal backslash in a string, you must escape it with another backslash. e.g. "\\"

提交回复
热议问题