将字符串 \ 替换为 / android

Replace string \ with / android

我需要用“/”替换字符串“\” 我试过了

myString.replace("\","/");

但这是它所说的一种语法

String literal is not properly closed by a double-quote

我该怎么做?

像这样转义反斜杠:

myString.replace("\","/");