- Identify the best AP CSA data type for each value.
a. Number of students b. Ticket price c. Whether a game is finished
- Determine whether each Java variable name is valid. Explain any invalid name.
a. finalScore b. 4thQuarter c. double d. player_2
- Determine the exact output.
int first = 12;
int second = first;
first = 30;
System.out.println(second);
- Determine the exact output.
int tickets = 7;
int bonus = 3;
tickets = tickets + bonus * 2;
System.out.println(tickets);
- Determine the value printed by each statement.
a. 13 / 4 b. 13 / 4.0 c. 13.0 / 4
- Choose the Scanner method for each input.
a. A whole number b. A decimal number
- Correct the code so
score has a value before use.
int score;
int doubled = score * 2;
- Correct the declaration without changing the stored value.
- Declare all three values with meaningful camelCase names. A complete
main method is not required.
- 18 books
- a temperature of 21.5 degrees
- whether the library is open
- Declare the constant
MAX_PLAYERS with value 6.