example midterm

example midterm - Multiple Choice 1. These are the rules...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Multiple Choice 1. These are the rules that must be followed when writing a program: (Pg. 24) a. Syntax b. Punctuation c. Key words d. Operators 2. The Java compiler generates: (Pg. 24) a. Machine code b. Byte code c. Source code d. HTML 3. The following data: 72 , ‘A’ , “Hello World” , 2.8712 are all examples of (Pg. 108) a. variables b. literals c. strings d. none of these 4. What Scanner class method would you use to read a string as input? (Pg. 109) a. nextString b. nextLine c. readString d. getLine 5. >, <, and == are (Pg. 181) a. relational operators b. logical operators c. conditional operators d. ternary operators 6. To create a block of statements, you enclose the statements in these: (Pg. 182) a. parentheses ( ) b. square brackets [ ] c. angled brackets < > d. braces { } 7. An else clause always goes with: (Pg. 182) a. the closest previous if clause that doesn’t already have its own else clause b. the closest if clause c. the if clause that is randomly selected by the complier
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

example midterm - Multiple Choice 1. These are the rules...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online