Escape sequences – special characters

An escape sequence is a combination of characters in technical informatics that does not represent text, but is intercepted by the device and performs a special function.

CharacterMeaning
\”Double Quote
\’Single Quote
\\Backslash
\bBackspace
\tHorizontal tab
\nNewline
\fFormfeed
\rCarriage return

Example

class EscapeSequences {
	public static void main(String[] args) {
		System.out.println("Heading:\n\'single quote\'\n\"double quote\"\foffset1\foffset2\foffset3\foffset4\nnew line");
	}
}
Output
'single quote'
"double quote"
              offset1
                     offset2
                            offset3
                                   offset4
new line