If you simply trying to replace one character like that, use the replace method:
class ReplaceAll
{
public static void main(String[] args)
{
String s = "Replace /, /, and /";
String replace = s.replace('/','r');
System.out.println(replace);
}
}