This project demonstrates the use of the Java Collections API to count the frequency of each character in a given string. It's a simple yet effective way to showcase the power of Java's data structures in processing and analyzing text data.
- Character Frequency Count: Counts the frequency of each character in the provided string.
- Case Insensitive Counting: Optionally, counts characters in a case-insensitive manner.
- Java JDK 8 or above.
To run the program, compile the Java files and then run the main class. You can provide the string via standard input.
The program uses a HashMap<Character, Integer>
to store the count of each character. It iterates over each character in the string, checks if it is already in the map, and updates the count accordingly.