Syntax / Output Worksheet

Total Page:16

File Type:pdf, Size:1020Kb

Syntax / Output Worksheet

Name : ______Date : ______

Computer Science - Syntax / Output Worksheet 1

DIRECTIONS : Fill in each blank with the correct answer/output.

1. All java statements are terminated with a ______.

2. An open ______must have a close ______.

3. ______is the newline character.

4. ______is the tab character.

5. ______is used for a one line comment.

System.out.print( "one" ); // LINE 1

System.out.print( "o\tne" ); // LINE 2

System.out.print( "on\te" ); // LINE 3

System.out.print( "on\\e" ); // LINE 4

System.out.print( 4 + 3); // LINE 5

System.out.print( 3 + " " + 4 ); // LINE 6

System.out.print("\" quotes \""); // LINE 7

System.out.print( "\\\\t\\a\\"); // LINE 8

System.out.print( "\\a\\b\\c" ); // LINE 9

System.out.print( 3 + " " + 4 + 5); // LINE 10

System.out.print( 3 + 4 + " " + 5 + 6); // LINE 11

© A+ Computer Science – Syntax / Output Worksheet – www.apluscompsci.com

Recommended publications