An open API service indexing awesome lists of open source software.

https://github.com/nurulashraf/java-palindrome-checker

A simple Java program to check if a given string or number is a palindrome. It removes non-alphanumeric characters, ignores case, and handles errors like empty input. Includes a clean, efficient implementation with proper error handling.
https://github.com/nurulashraf/java-palindrome-checker

basic-algorithms beginner-friendly error-handling java palindrome string-manipulation text-processing

Last synced: about 2 months ago
JSON representation

A simple Java program to check if a given string or number is a palindrome. It removes non-alphanumeric characters, ignores case, and handles errors like empty input. Includes a clean, efficient implementation with proper error handling.

Awesome Lists containing this project

README

        

# Java Palindrome Checker

## Description
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.

## Features
- Supports both strings and numbers
- Ignores case and special characters
- Provides proper error handling
- Uses a clean and efficient algorithm

## Requirements
- Java 8 or later

## Installation
1. Clone the repository:
```sh
git clone https://github.com/nurulashraf/java-palindrome-checker.git
```
2. Navigate to the project directory:
```sh
cd java-palindrome-checker
```

## Usage
1. Compile the program:
```sh
javac src/palindromechecker/PalindromeChecker.java
```
2. Run the program:
```sh
java -cp src palindromechecker.PalindromeChecker
```
3. Enter a string or number when prompted.

## Example
```
Enter a string or number: Racecar
The input is a palindrome.
```

## Repository Structure
```
java-palindrome-checker/
│── src/
│ └── PalindromeChecker.java
│── README.md
└── LICENSE
```

## License
This project is licensed under the [MIT License](LICENSE).