Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Beginner/Palindrome.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import java.util.Scanner;

public class Palindrome {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter a string: ");
String str = sc.nextLine();
String reversed = new StringBuilder(str).reverse().toString();
if(str.equals(reversed)){
System.out.println(str + " is a palindrome.");
} else {
System.out.println(str + " is not a palindrome.");
}
}
}
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributing to Java-Programs

Thank you for considering contributing to this repository! Here's how you can help:

## How to Contribute

1. **Fork the repository**: Click on the "Fork" button at the top-right corner of this page.
2. **Clone your fork**: `git clone https://github.com/your-username/Java-Programs.git`
3. **Create a new branch**: `git checkout -b feature/your-feature`
4. **Make your changes**: Implement your feature or fix.
5. **Commit your changes**: `git commit -m 'Add feature: your-feature'`
6. **Push to your branch**: `git push origin feature/your-feature`
7. **Open a pull request**: Go to the "Pull Requests" tab and click "New Pull Request".

## Code Style

- Follow Java naming conventions.
- Write clear and concise commit messages.
- Ensure your code is properly indented and formatted.

## Issues

If you find any bugs or have suggestions, please open an issue before submitting a pull request.

Happy coding!