Which of the following allows duplicate entries? Group of answer choices A.Map B.List C.None D.Set 2# We have two classes, Person and Employee. Both have a field, firstName. We have instances of these objects Person p and Employee e. Both p and e have the same value for firstName, specifically, p.firstName = “joe” and e.firstName = “joe” Which of the following statements is necessarily true? Group of answer choices A. p.equals(e) will return true because they contain the same firstName. B. We don’t know if either class will have an equals method. C.There is not enough information to tell what p.equals(e) will return. D. p.equals(e) will return false but p == e will be true.
1. Which of the following allows duplicate entries?
Group of answer choices
A.Map
B.List
C.None
D.Set
2#
We have two classes, Person and Employee. Both have a field, firstName. We have instances of these objects Person p and Employee e. Both p and e have the same value for firstName, specifically, p.firstName = “joe” and e.firstName = “joe” Which of the following statements is necessarily true?
Group of answer choices
A. p.equals(e) will return true because they contain the same firstName.
B. We don’t know if either class will have an equals method.
C.There is not enough information to tell what p.equals(e) will return.
D. p.equals(e) will return false but p == e will be true.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images