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) ;
Names.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:

Verified
Correct Answer:
Verified
Q58: Which one of the following code snippets
Q60: Which statement(s) about the size of a
Q61: Consider the following code snippet: ArrayList<Integer> num1
Q62: Which code snippet calculates the sum of
Q64: Which statements are true regarding the differences
Q65: Which one of the following statements is
Q66: What will be printed by the statements
Q67: Consider the following code snippet in Java
Q68: Assume the following variable has been declared
Q95: Why is the use of physical objects