Solved

Which Statement Is True About the Code Snippet Below? ArrayList<String>

Question 81

Multiple Choice

Which statement is true about the code snippet below? ArrayList<String> names = new ArrayList<String>() ;
Names.add("John") ;
Names.add("Jerry") ;
ArrayList<String> friends = new ArrayList<String>(names) ;
Friends.add("Harry") ;


A) The final size of names is 2; the final size of friends is 3
B) The final size of names is 3; the final size of friends is 2
C) The final size of names is 3; the final size of friends is 3
D) Compilation error

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions