AP COMPUTER SCIENCE A Edhesive AP CS A Unit 1: Primitive Types EXAM answers
AP COMPUTER SCIENCE A Edhesive AP CS A Unit 1: Primitive Types EXAM answers Assuming that scan is a properly initialized Scanner variable, which of the following correctly inputs a String? - Answer>> String val = Line(); Consider the following code: int x = -3; x--; Sln(x); What is output? - Answer>> -4 Which of the following data types would be most appropriate to use when recording whether a switch is in the "on" or "off" position? - Answer>> boolean Which of the following is NOT a primitive data type? - Answer>> String What is output by the following code? int a = 91; Sln(a / 2); - Answer>> 45 Which of the following is a legal variable name in Java? - Answer>> ans What is (6 % 2) * 7? - Answer>> 0
Written for
- Institution
- Ap computer Science
- Course
- Ap computer Science
Document information
- Uploaded on
- April 19, 2024
- Number of pages
- 5
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal