A simple Java program to check if a given string or number is a palindrome. The program removes non-alphanumeric characters, ignores case sensitivity, and includes error handling for empty inputs.
- Supports both strings and numbers
- Ignores case and special characters
- Provides proper error handling
- Uses a clean and efficient algorithm
- Java 8 or later
- Clone the repository:
git clone https://github.com/nurulashraf/java-palindrome-checker.git
- Navigate to the project directory:
cd java-palindrome-checker
- Compile the program:
javac src/palindromechecker/PalindromeChecker.java
- Run the program:
java -cp src palindromechecker.PalindromeChecker
- Enter a string or number when prompted.
Enter a string or number: Racecar
The input is a palindrome.
java-palindrome-checker/
│── src/
│ └── PalindromeChecker.java
│── README.md
└── LICENSE
This project is licensed under the MIT License.