String path = "C:\\Documents and Settings\\Manoj\\Desktop";
path = path.replace("\\", "https://stackoverflow.com/");
// or
path = path.replaceAll("\\\\", "https://stackoverflow.com/");
Find more details in the Docs
String path = "C:\\Documents and Settings\\Manoj\\Desktop";
path = path.replace("\\", "https://stackoverflow.com/");
// or
path = path.replaceAll("\\\\", "https://stackoverflow.com/");
Find more details in the Docs