A comprehensive collection of Core Java programs, examples, notes, and interview-oriented implementations covering fundamental to advanced Java concepts.
- Variables and Data Types
- Operators
- Control Statements
- Arrays
- Strings
- Wrapper Classes
- Class and Object
- Constructor
- Inheritance
- Polymorphism
- Abstraction
- Encapsulation
- Interface
- Association, Aggregation, Composition
- Try-Catch-Finally
- Throw and Throws
- Custom Exceptions
- List
- Set
- Queue
- Map
- Iterator
- Comparable
- Comparator
- Generic Classes
- Generic Methods
- Wildcards
- Thread Class
- Runnable Interface
- Thread Lifecycle
- Synchronization
- Inter-Thread Communication
- Executor Framework
- Lambda Expressions
- Functional Interfaces
- Method References
- Stream API
- Optional
- Default Methods
- Static Methods
- Predicate
- Consumer
- Supplier
- Function
- Method Chaining
- Date and Time API
A class should have only one reason to change.
Software entities should be open for extension but closed for modification.
Objects of a superclass should be replaceable with objects of its subclasses.
Clients should not be forced to depend on interfaces they do not use.
High-level modules should not depend on low-level modules; both should depend on abstractions.
- File Operations
- Buffered Streams
- Serialization
- Deserialization
- Class Metadata
- Dynamic Method Invocation
- Accessing Fields and Methods at Runtime
- Singleton Pattern
- Factory Pattern
- Builder Pattern
- String Programs
- Collection Programs
- Stream API Programs
- Multithreading Programs
- Comparator and Comparable Examples
- Java 8 Coding Questions
src/
├── java_fundamentals/
├── oops/
├── collections/
├── multithreading/
├── java_8/
├── exception_handling/
├── generics/
├── reflection/
├── design_principles/
├── design_patterns/
- Java 8 or higher
- IntelliJ IDEA / Eclipse / VS Code
git clone https://github.com/piyushpingale23/core-java.gitCompile:
javac FileName.javaRun:
java FileNameThis repository is intended for:
- Java Beginners
- Interview Preparation
- Java Revision and Practice
- Understanding Core Java Concepts Through Examples
- Learning Java 8 Features
- Understanding SOLID Design Principles
Piyush Ingale