This repository contains a collection of Java practice programs organized from beginner to advanced.
The goal is to strengthen Java programming skills step by step — starting with basics, then moving to arrays, strings, OOP, and advanced concepts.
- Hello World program
- Sum of two numbers
- Check even/odd number
- Find largest of two/three numbers
- Check leap year
- Swap two numbers (with and without third variable)
- Simple calculator using
switch
- Multiplication table of a number
- Reverse a number
- Palindrome number check
- Armstrong number check
- Factorial (loop + recursion)
- Fibonacci series
- Sum of digits of a number
- Prime number check / Print primes in a range
- GCD & LCM of two numbers
- Find largest & smallest element in an array
- Sort an array (Bubble sort, Selection sort)
- Linear search & Binary search
- Matrix addition, subtraction, multiplication
- Transpose of a matrix
- Remove duplicates from an array
- Reverse a string without using built-in methods
- Palindrome string check
- Count vowels & consonants in a string
- Find duplicate characters in a string
- Check if two strings are anagrams
- Convert string to uppercase & lowercase without built-in methods
-
Student
class (with details) - Constructors (default & parameterized)
- Inheritance (
Person → Student → Employee
) - Polymorphism (method overloading & overriding)
- Abstract class example
- Interface implementation
- Encapsulation (getters/setters)
- Exception handling demo
- Multithreading (print even & odd numbers using 2 threads)
- File handling (read & write a text file)
- Collections demo (
ArrayList
,HashMap
,HashSet
) - Implement a simple stack & queue using classes
- Clone the repository
git clone https://github.com/SudharshanGeddam/Java-Practice.git