Challenge: Quotes and Tabs

Lab Java Beginner 10 points

Print these two lines. The space in the first line is a tab (\t):

Name:	Java
Motto: "Write once, run anywhere"

Input

None.

Output

The two lines above.

Example

Output

Name:	Java
Motto: "Write once, run anywhere"
Sample output available
Editor
Java

Hints

\t gives a tab.

Write \" to put a double quote inside text.

Solution explanation

\t is a tab and \" puts a quote inside a string without ending it.

Show solution
public class Main {
    public static void main(String[] args) {
        System.out.println("Name:\tJava");
        System.out.println("Motto: \"Write once, run anywhere\"");
    }
}
Output
Answer
HOME LABS COMMUNITY DASHBOARD