JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
AP Computer Science A Quiz - Unit 5
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
Which of the following is not a type of comment in the coding language of Java?
*
1 point
//
/*
/**
if
Questions 2-4: refer to the class definition below
What will the output be based on the code segment below this question?
*
1 point
1800.2
1800.20
1801
1800
What will the output be?
*
1 point
1800
Billion Gates1211288
1913801
Nothing is printed out.
What will the output be based on the code below this question?
*
1 point
1800.210.2
1800.2 10.0
1800.2
10.0
The code contains an error.
Which of the following answer choices below this question accurately describes what is System Reliability?
*
1 point
Is when the code does not work as expected
Is when all programs and code work as intended.
Is when all code contains an error
None of the above
What should a computing professional do according to the ACM’s Code of Ethics?
*
1 point
To teach computing classes to kindergarten students
To teach computing classes to second grade students.
Respect privacy
None of the above
What is the keyword class used for?
*
1 point
Used to turn everything into zero
Used to turn everything into one-hundred
Utilized for defining a new class
None of the above
Which of the following answer choices beneath this question accurately describes Java?
*
1 point
An instance variable
A primitive value
A programming language, which allows you to order a computer what to do.
A mutator method.
Question 9: refer to the class definition below
Untitled Question
*
1 point
The word “name” is misspelled.
No semicolon after “private String name”
No error
None of the above
What are Constructors used for in the coding language of Java?
*
1 point
Define what are primitive values
Creates videos on Youtube
None of the above
Used to initialize fields in an object that is newly created.
Questions 11-13: Refer to the class definition below
Which of the following answer choices can be a header for a new Constructor for the class Country?
*
1 point
New Country= “a” 2e
Country a= new Country("a", 2,2);
Country asbx= news Country(2e.2wfwlfkn3wli)
None of the above
Which of the following answer choices CAN’T be a header for a new Constructor for the class Country?
*
1 point
Country aaa= newaz Country
Country ax= new Country("aa", 2,2);
Country aIx= new Country("Saa", 2222,2222);
None of the above.
Based on the code segment beneath this question, what will the code segment print out?
*
1 point
Saa2
SAA 333
Saa (new line) 2
None of the above
Questions 14-16: Refer to this class definition below
After the code below this question is executed, what is printed out?
*
1 point
21
22
1
Nothing is printed out
What is the value of lakers after this code segment below the question is executed?
*
1 point
24
26
28
20
After the code below this question is executed, what is the output?
*
1 point
120
122
121
None of the above
Questions 17-20: refer to the class definition below:
What is printed out after this line of code is executed below this question?
*
1 point
Batum
Ratum
Tatum
There is an error
What is the value of man after this code below the question runs?
*
1 point
Banana
Fruit
Fruitssnjw
Ben Simmons
None of the above
Which of the following answer choices below this question CAN’T be a header for a new Constructor for the class Art?
*
1 point
Art m= new Art("Madden");
Art third= new Art("Katy");
Art mm= new Art("MA");
s Art m= new Art("Madden");
Which of the following answer choices below this question can be a header for a new Constructor for the class Art?
*
1 point
s Art m= new Art("Madden");ksn
Art mskwdod= new Arts(“s);da
Art maxey= new Art("Maxey");
None of the above
Submit
Clear form
This content is neither created nor endorsed by Google.
Report Abuse
-
Terms of Service
-
Privacy Policy
Forms