Name : ___________________________ Date : _________________ A+ Computer Science - Syntax / Output Worksheet 1 DIRECTIONS : Fill in each blank with the correct answer/output. Assume each statement happens in order and that one statement may affect the next statement. 1. All java statements are terminated with a _____________________. 2. An open __________________ must have a close ___________________. 3. ___________________ 4. ____________________ 5. _______________________ 6. Never put a _______________________ before an open brace. is the newline character. is the tab character. is used for a one line comment. System.out.println( "one" ); // LINE 1 1. _______________ System.out.println( "o\tne" ); // LINE 2 2. _______________ System.out.println( "on\te" ); // LINE 3 3. _______________ System.out.println( "on\\e" ); // LINE 4 4. _______________ System.out.println( 4 + 3); // LINE 5 5. _______________ System.out.println( 3 + " " + 4 ); // LINE 6 6. _______________ System.out.println("\" quotes // LINE 7 7. _______________ System.out.println( "\\\\t\\a\\"); // LINE 8 8. _______________ System.out.println( "\\a\\b\\c" ); // LINE 9 9. _______________ System.out.println( 3 + " " + 4 + 5); // LINE 10 10. _______________ System.out.println( 3 + 4 + " " + 5 + 6); // LINE 11 11. _______________ \""); © A+ Computer Science – Syntax / Output Worksheet – www.apluscompsci.com
© Copyright 2025