<< Chapter < Page Chapter >> Page >

True or False? The program shown in Listing 1 compares the search speed of the ArrayList class and the TreeSet class.

Answer 9

Question 10

True or False? The program shown in Listing 1 instantiates a TreeSet object and populates it with approximately 10,000,000 elements.

Answer 10

Question 11

True or False? Because the add method of a Set object rejects duplicate elements, there may be fewer than 2,000,000 elements in the TreeSet object in Listing 1 after it is populated, depending on how many of the random values are duplicates.

Answer 11

Question 12

True or False? One of the capabilities of the Collection Framework is to create a new Collection object and populate it with the contents of an existing Collection object of a different (or the same) actual type.

Answer 12

Question 13

True or False? The code in Listing 1 instantiates an ArrayList object and populates it with exactly 2,000,000 random values that are different from the random valuescontained in the TreeSet object.

Answer 13

Question 14

True or False? The ArrayList object in Listing 1 may contain duplicate values.

Answer 14

Question 15

True or False? Listing 1 calls the get method on the ArrayList object. The ArrayList class implements the List interface. The get method of the List interface is inherited from the Collection interface.

Answer 15

Question 16

True or False? In general, the time required for the contains method to find a value in a TreeSet object is less than the time required for the contains method to find a value in an ArrayList object.

Answer 16

Question 17

True or False? The very fast searching speed of a TreeSet object results from the implementation of the Set interface.

Answer 17

Question 18

True or False? Polymorphic behavior means that the actual method that is executed on a Collection object is the appropriate method for that type of object regardless of the actual type (class) of the reference to the object.

Answer 18

Question 19

True or False? Some of the implementations of the Java Collections Framework maintain their elements in a random order, and other implementations maintaintheir elements in a sorted order. The sorting algorithms used to maintain the order of the collections in the Collections Framework are exposed in the sameway that the search algorithm is exposed (via the contains method).

Answer 19

Question 20

True or False? The interfaces in the Collections Framework make it possible to manipulate the contents of collections in a manner that is independent of the underlying implementation of each collection.

Answer 20


What is the meaning of the following two images?

These images were inserted here simply to insert some space between the questions and the answers to keep them from being visible on the screen at thesame time.

Spacer image of a rabbit and a penguin.

This image was also inserted for the purpose of inserting space between the questions and the answers.

Spacer image of a penguin and some houses.


Answer 20


Back to Question 20

Answer 19

False. The sorting algorithms used to maintain the order of the collections in the Collections Framework are not exposed in the way that the searchalgorithm is exposed (via the contains method). Rather, the sorting algorithms are implicit in those implementations that need them, and are absent from thoseimplementations that don't need them.

Questions & Answers

what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
characteristics of micro business
for teaching engĺish at school how nano technology help us
How can I make nanorobot?
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
how can I make nanorobot?
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
what is the actual application of fullerenes nowadays?
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Berger describes sociologists as concerned with
Mueller Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Object-oriented programming (oop) with java. OpenStax CNX. Jun 29, 2016 Download for free at https://legacy.cnx.org/content/col11441/1.201
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?