Solved

To Create a Set That Consists of String Elements "Red

Question 1

Multiple Choice

To create a set that consists of string elements "red", "green", and "blue", use


A) new HashSet(new String[]{"red", "green", "blue"})
B) new Set(Arrays.asList(new String[]{"red", "green", "blue"}) )
"}) )
C) new HashSet(Arrays.asList(new String[]{"red", "green", "blue"}) )
D) new HashSet({"red", "green", "blue"})

Correct Answer:

verifed

Verified

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents