Skip to content

NarendraCodeHub/100-JAVA-Programs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

100-JAVA-Programs

Welcome to the 100-JAVA-Programs repository! This collection is designed to help you improve your understanding of Java and enhance your problem-solving skills through practical coding exercises.

What's Inside

  • 100 Java Programs: A curated set of programs covering topics from basic syntax to algorithms, data structures, and object-oriented programming.
  • Logic Building: Each program is crafted to challenge and develop logical thinking, crucial for writing efficient and effective code.
  • Comprehensive Explanations: Each program is paired with explanations to help you grasp the concepts and reinforce your learning.
  • Real-World Applications: Practical programs with direct applications in Java automation and problem-solving.

How to Use This Repository

  1. Clone the Repository:
    Clone this repository to your local machine using the following command:
    git clone https://github.com/yourusername/100-JAVA-Programs.git
    
  2. Explore the Programs: Browse through the programs in the repository. Each program is designed to target specific Java concepts and logic-building exercises.

3.Practice and Modify: Run the programs and experiment by modifying the code to observe the effects of your changes. This hands-on approach will solidify your understanding.

  1. Contribute: Found an interesting program or improvement? Feel free to fork the repository, make changes, and submit a pull request!

Here's the updated ## File Structure section for your repository, reflecting the file directory structure with all programs located in the src folder:


File Structure

Below is the list of programs included in this repository, organized under the src directory:

Java Programs List

  1. Simple Java Program
    File: src/HelloWorld.java
    Description: Prints "Hello, World!" to the console.

  2. Print Integer in Java
    File: src/Integers.java
    Description: Prints an integer to the console.

  3. Command Line Argument
    File: src/Arguments.java
    Description: Demonstrates handling and printing of command-line arguments.

  4. Get Input Using Scanner
    File: src/GetInputFromUser.java
    Description: Accepts user input using the Scanner class.

  5. Convert Fahrenheit to Celsius
    File: src/FahrenheitToCelsius.java
    Description: Converts temperature from Fahrenheit to Celsius.

  6. Swap Two Numbers Using Third Variable
    File: src/SwapNumbers.java
    Description: Swaps two numbers using a temporary variable.

  7. Swap Two Numbers Without Third Variable
    File: src/SwapNumbersWithout.java
    Description: Swaps two numbers without using an extra variable.

  8. Add Two Numbers
    File: src/AddNumbers.java
    Description: Adds two numbers and displays the result.

  9. Find Largest of Three Numbers
    File: src/LargestOfThreeNumbers.java
    Description: Finds the largest among three numbers.

  10. If-Else Statement Program
    File: src/IfElse.java
    Description: Demonstrates the if-else conditional statement.

  11. Odd or Even Number
    File: src/OddOrEven.java
    Description: Checks whether a number is odd or even.

  12. Factorial Program
    File: src/Factorial.java
    Description: Calculates factorial of a number.

  13. Compare String Program
    File: src/CompareString.java
    Description: Compares two strings lexicographically.

  14. For Loop Program
    File: src/ForLoop.java
    Description: Demonstrates the use of for loop.

  15. While Loop Program
    File: src/WhileLoop.java
    Description: Demonstrates the use of while loop.

  16. Reverse Number Program
    File: src/ReverseNumber.java
    Description: Reverses a valid integer number.

  17. Prime Number Program
    File: src/PrimeNumbers.java
    Description: Checks whether a number is prime.

  18. Armstrong Number Program
    File: src/ArmstrongNumber.java
    Description: Checks whether a number is an Armstrong number.

  19. Multiplication Table Program
    File: src/MultiplicationTable.java
    Description: Prints multiplication table of a number.

  20. Enhanced For Loop Program
    File: src/EnhancedForLoop.java
    Description: Demonstrates enhanced for-each loop.

  21. Alphabets Program
    File: src/Alphabets.java
    Description: Prints alphabets using loop.

  22. Break While Loop Program
    File: src/BreakWhileLoop.java
    Description: Demonstrates break statement in while loop.

  23. Break and Continue While Loop Program
    File: src/BreakContinueWhileLoop.java
    Description: Demonstrates break and continue statements.

  24. Reverse String Program
    File: src/ReverseString.java
    Description: Reverses a string.

  25. Palindrome String Program
    File: src/Palindrome.java
    Description: Checks whether a string is palindrome.

  26. String Comparator Program
    File: src/StringComparator.java
    Description: Compares two strings.

  27. String EndsWith Program
    File: src/StringEndsWith.java
    Description: Demonstrates endsWith() string method.

  28. IndexOf Input Program
    File: src/IndexOfInput.java
    Description: Demonstrates indexOf() method.

  29. Replace All String Program
    File: src/ReplaceAllEnterString.java
    Description: Replaces words in a string.

  30. Split String Program
    File: src/SplitExample.java
    Description: Demonstrates split() string method.

  31. String Trim Program
    File: src/StringTrimExample.java
    Description: Removes leading and trailing spaces from string.

  32. String Lowercase Program
    File: src/StringLowerExample.java
    Description: Converts string to lowercase.

  33. String Methods Program
    File: src/StringMethods.java
    Description: Finds string length, replace text, and concatenate strings.

  34. Method Program
    File: src/Method.java
    Description: Demonstrates Java methods.

  35. Static Block Program
    File: src/StaticBlock.java
    Description: Demonstrates static block execution before main method.


Who This Repository Is For

Beginners: If you're new to Java, this repository is a great way to get hands-on experience with a wide range of Java concepts.

Intermediate Developers: Strengthen your logical thinking and code efficiency with increasingly complex programs.

Automation Engineers: Enhance your Java skills with practical programs that are directly applicable to Java automation.

Contributing

We welcome contributions! If you have an idea for a new program or an improvement to an existing one, please fork the repository and submit a pull request. Your contributions can help others learn and grow.

License

This repository is licensed under the MIT License. See the LICENSE file for more details.

About

Welcome to the 100-JAVA-Programs repository! This collection is designed to help you improve your understanding of Java and enhance your problem-solving skills through practical coding exercises.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages