Skip to content

dimpeshmalviya/JavaBasicPrograms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 JavaBasicPrograms 🧩

A curated collection of fundamental Java programs for beginners, students, and interview preparation.


📖 About

This repository contains basic and intermediate Java programs that cover a wide range of concepts — from simple logic building to algorithms.
It’s designed to help you:

  • 🧠 Understand Java fundamentals through hands-on examples
  • 💻 Practice algorithmic and logical problems
  • 🎯 Prepare for coding interviews and tests
  • ⚙️ Explore common Java programming patterns

✨ What’s Inside

You’ll find implementations of:

  • 🔢 Mathematical Problems: Factorial, Fibonacci, Prime numbers, Armstrong, etc.
  • 🔍 Sorting & Searching: Bubble Sort, Selection Sort, Binary Search, etc.
  • 🔠 String Manipulation: Palindrome, Anagram, Character Occurrence, etc.
  • 🧮 Algorithmic Challenges: Max Subarray Sum, Sieve of Eratosthenes, etc.
  • 🧵 Concurrency Examples: Synchronization, Threads, Runnable interfaces
  • 🧰 Utility Programs: Password Strength Checker, Pattern Printing, etc.

Each program is self-contained, well-commented, and written with readability in mind.


⚙️ Getting Started

🧩 Prerequisites

Before you begin, ensure you have the following installed:

  • Java Development Kit (JDK) – Version 8 or higher
  • Any IDE – IntelliJ IDEA, Eclipse, VS Code, or even Notepad++
  • (Optional) Git for version control

▶️ How to Run

Clone the repository and execute any Java file you want to try:

# Clone this repository
git clone https://github.com/dimpeshmalviya/JavaBasicPrograms.git

# Move into the project directory
cd JavaBasicPrograms

# Compile a specific Java file
javac FileName.java

# Run the compiled class
java FileName

📝 Replace FileName with the actual program file name (without .java).

Alternatively, you can open the project in an IDE and run files directly.


🤝 Contributing

Contributions are always welcome!

If you’d like to improve an existing program, fix bugs, or add new ones, follow these steps:

  1. Fork this repo

  2. Create a branch for your feature

    git checkout -b feature/YourFeatureName
  3. Make your changes and commit

    git commit -m "Add factorial using recursion"
  4. Push the branch

    git push origin feature/YourFeatureName
  5. Open a Pull Request

🧭 Contribution Guidelines

  • Keep code simple, readable, and well-commented
  • Use descriptive names for variables and methods
  • Add example input/output if relevant
  • Update this README if you add a new major category

📜 License

This project is licensed under the MIT License. You are free to use, modify, and distribute this project with attribution.


💬 Contact & Acknowledgments

👤 Author: Dimpesh Malviya 📂 Repository: JavaBasicPrograms

💡 Have suggestions or improvements? Feel free to open an issue or PR!


Our Contributors

Our Forkers

Our Stargazer

“The only way to learn a new programming language is by writing programs in it.”
— Dennis Ritchie

🌟 If you find this helpful, don’t forget to star the repository!

Releases

No releases published

Packages

No packages published

Contributors 39

Languages