This project is a simple Java application that checks whether a given string is a palindrome.
A palindrome is a string that reads the same forwards and backwards. The program reverses the input string and compares it with the original string to determine whether it is a palindrome.
This task was completed as part of an internship assignment to strengthen fundamental Java programming skills.
- Write a Java program to check if a given string is a palindrome
- Reverse the input string using a custom method
- Compare the original and reversed strings
- Display the result to the user
- Java
- Eclipse IDE
- Scanner class for user input
- Takes a string input from the user
- Reverses the string character by character
- Compares the reversed string with the original string
- Prints whether the string is a palindrome or not
- Ignores case sensitivity while comparison
- A loop is used to traverse the string from the last character to the first
- The reversed string is constructed by appending characters
- The
equalsIgnoreCase()method is used to compare both strings