Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Private instance attributes modified by public (or protected) methods is known a

ID: 3840022 • Letter: P

Question

Private instance attributes modified by public (or protected) methods is known as _____. a. Polymorphism b. Information-hiding c. Abstraction d. Encapsulation The BlockingQueue object is helpful when trying to communicate between threads of an application What method will place an object on the queue and wait until there's space on the queue? a. add (o) b. offer (o) c. put (o) d. take (o) What is the difference between PriorityBlockingQueue and a normal BlockingQueue? a. PBQ lets the producer set the sort order of the objects on the queue. b. PBQ lets the producer set the position order of the objects. c. PBQ implement methods that make producers and consumers wait for space on the queue. d. PBQ allows the program to set the maximum capacity of the queue? Which object allows for objects to be added, and referenced by, a key value? a. HashSet b. Tree Set c. HashMap d. TreeMa e. Answers C & D The put method for HashSet does the following: a. If item does not exist, adds the item b. If item does exist, updates the item c. If item does exist, if value has changed updates the item d. If item does not exist, throws an exception e. Answers A & B

Explanation / Answer

Question 1
Answer: Encapsulation

Question 2
Answer: c. put(o)

Question 3
Answer: B. PBQ lets the producer set the position order of the objects

Question 4
Answer: e. Answers C & D

Question 5

Answer: e. Answers A & B

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote