MyClass.java
 

public class MyClass {
  public static void main(String[] args) {
    String txt = "The character \\ is called backslash.";
    System.out.println(txt);
  }
}

Result:
The character \ is called backslash.