AP Computer Science A Final Exam Review ACTUAL UPDATED QUESTIONS AND
CORRECT ANSWERS
What is the data type of the following literal? string
"fooled you"
What is the camel case variable name for a variable that topScore
represents the top score?
What are the three primitive data types that will be tested double boolean int
on the AP Exam?
What is the camel case variable name for a variable that shoeSize
represents a shoe size?
What data type should you use to represent the average double
grade for a course?
What data type should you use for a shoe size like 8.5? double
, What data type should you use to record if it is raining or boolean
not?
What is the data type of the following literal? char
'A'
What data type holds true/false values? boolean
What data type should you use to represent the amount double
of money in a bank account?
Which of the following is NOT the name of a Java String
primitive data type?
What are the two varieties of data in Java? objects and primitive
Which of the following is the correct header line for the public static void main (String args [])
main method in Java?
A ____ is a note written to a human reader of a program. comment
Which of the following will result in an error? 12 + (13 + 7)/2 ) * 4
What are the two steps that take place when an (i) Evaluate the Expression, and (ii) Store the value in the variable.
assignment statement is executed?
On a single line of code declare x, y, and z all to be an int x, y, z;
integer data type.
(2 - 6) / 2 + 9 7
Which of the following is legal? x=9
State what is printed. -22
int x = 40;
int y = 4;
System.out.println(2 + 8 * y / 2 - x);
What is the value of the expression: 1
-5 + 10
CORRECT ANSWERS
What is the data type of the following literal? string
"fooled you"
What is the camel case variable name for a variable that topScore
represents the top score?
What are the three primitive data types that will be tested double boolean int
on the AP Exam?
What is the camel case variable name for a variable that shoeSize
represents a shoe size?
What data type should you use to represent the average double
grade for a course?
What data type should you use for a shoe size like 8.5? double
, What data type should you use to record if it is raining or boolean
not?
What is the data type of the following literal? char
'A'
What data type holds true/false values? boolean
What data type should you use to represent the amount double
of money in a bank account?
Which of the following is NOT the name of a Java String
primitive data type?
What are the two varieties of data in Java? objects and primitive
Which of the following is the correct header line for the public static void main (String args [])
main method in Java?
A ____ is a note written to a human reader of a program. comment
Which of the following will result in an error? 12 + (13 + 7)/2 ) * 4
What are the two steps that take place when an (i) Evaluate the Expression, and (ii) Store the value in the variable.
assignment statement is executed?
On a single line of code declare x, y, and z all to be an int x, y, z;
integer data type.
(2 - 6) / 2 + 9 7
Which of the following is legal? x=9
State what is printed. -22
int x = 40;
int y = 4;
System.out.println(2 + 8 * y / 2 - x);
What is the value of the expression: 1
-5 + 10