I want to change the backslash in a string to double backslash.

I have

String path = "C:\Program Files\Text.txt";

and I want to change it to

"C:\\Program Files\\Text.txt"
Edit
Report