DemoPrograms
In this repository all Core Java related programs are added, which are mostly tricky one.
Topics: Core java, Collection, Multi threading, Data Structure, Generics, Java8 features, Streams, Functional Interfaces, Reflection, Recursion, Comparator related interview programs.
Here all related codes are places in respective packages listed below.
Topics Covered per package
- Combination
- Array of Combination (Number)
- String Combination
- Comparator
- Comparator on Multiple Fields (Java 7)
- Comparator on Multiple Fields (Java 8)
- Conversions
- Copy
- Deep Copy
- Deep Copy using CLone method
- Shallow Copy
- Data Structure
- Searching
- BFS (Breath First Search) Graph
- BFS (Breath First Search) Shortest Path Graph
- DFS (Depth First Search) Graph
- Sorting
- Bubble Sort
- Insertion Sort
- Selection Sort
- Binary Tree Depth
- Detect Loop in Linked List
- Detect and Remove Loop in Linked List
- LRU (Last Recently Used) Cache
- Find Value in Binary Tree
- Searching
- Elevator program
- Finally Block
- Generics
- Lower Bounded Wildcards
- Unbounded Wildcards
- Upper Bounded Wildcards
- Hash and Equals
- Image Compression
- Immutable
- Interface - Functional Interface
- Java 8 Features
- Functional Interfaces
- BiConsumer
- BiFunction
- BiPredicate
- Comparator
- Consumer
- Custom Functional Interface
- Functions
- Map Reduce
- Predicates
- Streams
- Suppliers
- List Operations
- Find Missing Elements from Duplicate List
- Remove Duplicate Elements from List
- Map Operations
- Count Chars and Print in Order as per Count
- Iterate Maps using Java 7 and Java 8
- Max Repetitive Letter from String
- Method Calls
- Method Calls on Overloaded Classes with Extending
- Static method calls by Extending
- Numbers Operations
- N Prime Numbers
- Sum of Numbers
- Overriding
- Overriding methods
- Overriding Rules while Extending Classes
- Palindrome
- Array of Numbers Palindrome
- String Palindrome with Multiple Techniques
- Pattern programs
- Christmas Tree using Stars (*)
- Permutation
- Permutation using Recursion and Swapping
- Permutation using Substring
- Recursion
- Biggest in Array
- Factorial
- Fibonacci Series
- Reverse String
- Reflection
- Get Class's Public and Private Fields
- Get Class Information
- Get Class's Public and Private Methods
- Runtime Package
- Garbage Collection
- Log Monitor
- Run Commands using Java
- Singleton Prevention
- Restrict Singleton from Cloning
- Restrict Singleton from Reflection
- Restrict Singleton from Serialization
- Store SQL
- Run SQL Script on Oracle DB
- Multi-threading
- Blocking Queue
- Hello World Printing from 2 Different Threads
- Java Atomic Integer
- Join in Thread
- Producer and Consumer using Synchronized Blocks
- Producer and Consumer using Locks
- Return/Get Value from Thread
- Return/Get Value from Thread using Callable Interface
- Sum of Numbers Range using Executor Framework
- Synchronized method test
- Thread Groups
- Wait and Notify