Discussion
What Collections.frequency counts - which of the following is true?
Answer: C
Correct answer: How many elements of the collection are equal to the given object.
Collections.frequency(c, o) walks the collection and counts the elements equal to o, using equals - or an identity comparison when o is null. It is a linear scan and is chiefly useful on a List or other collection that permits duplicates, since in a Set the answer can only be zero or one.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development