← Back to Printing
Question 21
Mixed Escape Sequences
Mixed Escape Sequences
Use one System.out.println() statement with both \n and \t to display the formatted text shown in Expected Output.
The colons should be followed by a tab space before the values. The two lines should be separated by a newline character. Your output should have "Name:" tabbed to "John" on the first line, then "Age:" tabbed to "30" on the second line.Expected Output:
Name: John Age: 30
= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.