Print \
how we can print \ in java
1 Answer
6 years ago by Shaikh Aayan
\ is escape literal in Java, so you need to escape it using another \. If you want to print you need do the following
System.out.println("\\");
Check it here https://onecompiler.com/java/3v8mkmynp
6 years ago by Karthik Divi