Java Reference
In-Depth Information
8. What is the output produced from the following statements?
System.out.println("name\tage\theight");
System.out.println("Archie\t17\t5'9\"");
System.out.println("Betty\t17\t5'6\"");
System.out.println("Jughead\t16\t6'");
9. What is the output produced from the following statements?
System.out.println("Shaq is 7'1");
System.out.println("The string \"\" is an empty message.");
System.out.println("\\'\"\"");
10. What is the output produced from the following statements?
System.out.println("\ta\tb\tc");
System.out.println("\\\\");
System.out.println("'");
System.out.println("\"\"\"");
System.out.println("C:\nin\the downward spiral");
11. What is the output produced from the following statements?
System.out.println("Dear \"DoubleSlash\" magazine,");
System.out.println();
System.out.println("\tYour publication confuses me. Is it");
System.out.println("a \\\\ slash or a //// slash?");
System.out.println("\nSincerely,");
System.out.println("Susan \"Suzy\" Smith");
12. What series of println statements would produce the following output?
"Several slashes are sometimes seen,"
said Sally. "I've said so." See?
\ / \\ // \\\ ///
13. What series of println statements would produce the following output?
This is a test of your
knowledge of "quotes" used
in 'string literals.'
You're bound to "get it right"
if you read the section on
''quotes.''
14. Write a println statement that produces the following output:
/ \ // \\ /// \\\
Search WWH ::




Custom Search