//How can I make Java print quotes, like “Hello”?
How can I make Java print quotes, like “Hello”?
System.out.print(“\”Hello\””);
The double quote character has to be escaped with a backslash in a Java string literal. Other characters that need special treatment include:
Carriage return and newline: “\r” and “\n”
Backslash: “\\”
Single quote: “\'”
Horizontal tab and form feed: “\t” and “\f”