Return to site

JAVA CERTIFICATION QUESTION: HashSet and TreeSet sources in Java streams

=>Sometimes you must pay attention to the encounter order of elements in a stream.

· java

Given:

Assume that the behavior of the code not shown at the // CODE OMITTED HERE line is to add more elements to both setsand then delete all the newly added elements.

As a result, the number and values of the data items in the sets after this comment are identical to the contents before this line.

Which best describes the possible output? Choose one.

A. bebe

B. be

C. be

D.

·ꓛ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK