Kizspy | Question: 39 (Choose 1 answer)
You are tasked with implementing a system that tracks the frequency of words in a large text document.Explain how you would use a Java collection to efficiently achieve this, emphasizing the principles of
abstraction and encapsulation.
A. Utilize a HashMap<String, Integer> for efficient word frequency tracking.
B. Implement a LinkedList<String> to store words and their occurrences.
C. Use a PriorityQueue<String> to prioritize words based on frequency.
D. Employ a HashSet<String> for unique word storage.
E. Implement a custom WordFrequency Tracker class using a binary search tree.
F. Utilize a TreeMap<String, Integer> for a sorted mapping of words and frequencies.