Escape Sequences

Lab Java Beginner 10 points

With a single println, print these lines (the second starts with a tab):

Path: C:\temp
	Quote: "Java"

Input

None.

Output

The two lines above.

Example

Output

Path: C:\temp
	Quote: "Java"
Sample output available
Editor
Java

Hints

\n is a new line, \t a tab, \" a quote and \\ a backslash.

Solution explanation

Inside a string, the backslash starts an escape sequence, so a real backslash is written \\.

Show solution
public class Main {
    public static void main(String[] args) {
        System.out.println("Path: C:\\temp\n\tQuote: \"Java\"");
    }
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD