SergeiSSP / Java-Collections-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java Character Counting Project

Overview

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.

Features

  • Character Frequency Count: Counts the frequency of each character in the provided string.
  • Case Insensitive Counting: Optionally, counts characters in a case-insensitive manner.

Requirements

  • Java JDK 8 or above.

Usage

To run the program, compile the Java files and then run the main class. You can provide the string via standard input.

How It Works

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.

About


Languages

Language:Java 100.0%