CharacterFrequencyCounter is a Java program that counts the frequency of each character in a text file. The program reads a user-specified file, counts the number of occurrences of each character in the file, and outputs the results to a file named results.txt
.
To use the program, follow these steps:
1.Download the CharacterFrequencyCounter.java file to your local machine.
2.Open a terminal or command prompt and navigate to the directory containing the CharacterFrequencyCounter.java file.
3.Compile the program by running the following command:
javac CharacterFrequencyCounter.java
Run the program by running the following command:
java CharacterFrequencyCounter
When prompted, enter the name of the text file you want to analyze.
The program will generate a file named results.txt containing the frequency of each character in the input file.
A sample input file named sample.txt
is included in the repository for testing purposes.
If you find a bug or have a suggestion for improvement, please feel free to open an issue or submit a pull request.