fork download
  1. class Teste {
  2. public static void main(String[] args) {
  3. String teste1 = "a\\b\\c\\d\\e";
  4. System.out.println(teste1);
  5. String teste2 = teste1.replace("\\", "");
  6. System.out.println(teste2);
  7. String teste3 = teste1.replaceAll("\\\\", "");
  8. System.out.println(teste3);
  9. }
  10. }
Success #stdin #stdout 0.09s 28068KB
stdin
Standard input is empty
stdout
a\b\c\d\e
abcde
abcde