Skip to content

A simple Java program that checks whether two strings are anagrams. It reads multiple pairs of strings from an input file using BufferedReader, ignores spaces and case sensitivity, and outputs whether each pair is an anagram or not. Perfect for beginners learning Java, file handling, and string manipulation.

Notifications You must be signed in to change notification settings

Mooyi07/Anagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Œ Anagram Checker in Java

This project reads multiple string pairs from an input file (input.txt) and checks if they are anagrams.
An anagram means two words/phrases have the same letters, just arranged differently.


πŸ“– Features

  • Reads multiple string pairs from a file using BufferedReader\
  • Ignores spaces and is case-insensitive\
  • Outputs whether each pair is an anagram or not

πŸ“‚ File Format

The input file (input.txt) should contain pairs of strings separated by a comma ,.

Example input.txt:

Talent view, tenal eivw
hello, world
Listen, Silent
java, avaj

▢️ How to Run

  1. Compile the program:

    javac Anagram.java
  2. Run the program:

    java Anagram

βœ… Example Output

Talent view and tenal eivw is anagram
hello and world is not anagram
Listen and Silent is anagram
java and avaj is anagram

πŸ›  Future Improvements

  • Save results into output.txt\
  • Support JSON/CSV input format\
  • Add GUI interface for checking words interactively

About

A simple Java program that checks whether two strings are anagrams. It reads multiple pairs of strings from an input file using BufferedReader, ignores spaces and case sensitivity, and outputs whether each pair is an anagram or not. Perfect for beginners learning Java, file handling, and string manipulation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages