JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
AP Computer Science A Quiz - Unit 1
We wish you all the best luck studying for AP Computer Science A! Thank you to all of our wonderful Quiz Creators for making this possible!
- The Studyist Team
Sign in to Google
to save your progress.
Learn more
* Indicates required question
What does this code segment print out?
*
1 point
A.
B.
C.
D.
After this line of code is executed, what is the value of toyC?
*
1 point
A. 9
B. 100
C. 10
D. 8
What is the error in this code?
*
1 point
A. There are no errors
B. The variable s cannot be divided by zero.
C.There is no semicolon after the number 5.
D. There is no semicolon after 0.
What is the value for the boolean variable benSimmons after this code is executed?
*
1 point
A. Maybe false
B. false
C. 30
D. true
What will this code segment print out?
*
1 point
A. The new value is 93
B. 93
C. The new value is 93.4
D. twentyI
Which of the following answer choices is a valid value for a double?
*
1 point
A. 4.2
B. false
C. true
D. “4.3”
Which of the following answer choices is not a valid value for an int?
*
1 point
A. 20
B. 10
C. 9999
D. true
How is the modulus operator used in Java?
*
1 point
A.The operator is utilized to make every number come down to zero.
B.The operator is used to find out the remainder of the two numbers after division.
C.This operator is used to add two numbers.
D.This operator is used to cause errors.
Which of the following would result in the variable x to equal 3?
*
1 point
A. III only
B. II only
C. I and III
D. I, II, and III
Which of the following Java Data Type would be best used for representing the amount of shots Ben Simmons missed in the playoffs?
*
1 point
A. int
B. double
C. boolean
D. booleansi
What is the value of apL after this code executes?
*
1 point
A. 33
B. 4
C. 1 3/5
D. 3
What is the function of System.out.print()?
*
1 point
A. Causes lots and lots of errors
B. Prints out the value, and does not create a new line.
C. Prints out the value, and creates a new line.
D. Finds out the remainder after the process of division
What will this code segment print?
*
1 point
A. 32.0
B. joelEmbiid
C. This will give an error.
D. 32.0 Let’s buy some pairs of Nikes.
What is the value of ti after this code runs?
*
1 point
A. 1
B. 2
C. 3
D. 4
Which of the following code will not cause an error?
*
1 point
A. 300
B. String pa= 20;
C. int pp= 2.2;
D. double p= 3.2;
How does the ++ operator function?
*
1 point
A. Subtracts the value of the variable by one
B. Multiplies the value of the variable by three-thousand
C. Adds the value of the variable by one
D. None of the above
Which of the following is not a primitive type in the code of Java?
*
1 point
A. String
B. double
C. int
D. char
Which of the following answer choices correctly describes what casting is in Java?
*
1 point
A. Casting turns one data type into a different data type
B. Adds a value to an integer by one
C. It turns all data types into zero.
D. Brings all the other data types into the hospital
What is the value of computer after this code runs?
*
1 point
A.19
B.20
C.19.2
D.100
What will this code segment print out?
*
1 point
A. Nothing is printed
B.
C.
D. This code gives an error
Submit
Clear form
This content is neither created nor endorsed by Google.
Report Abuse
-
Terms of Service
-
Privacy Policy
Forms