Skip to content

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.

License

Notifications You must be signed in to change notification settings

nurulashraf/java-palindrome-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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:
    git clone https://github.com/nurulashraf/java-palindrome-checker.git
  2. Navigate to the project directory:
    cd java-palindrome-checker

Usage

  1. Compile the program:
    javac src/palindromechecker/PalindromeChecker.java
  2. Run the program:
    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.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy