Interview Prep
Java Interview Questions: https://github.com/a11exe/java-interview?tab=readme-ov-file
Single Responsibility Principle (SRP)
: A class should have only one reason to change.
Open/Closed Principle (OCP)
: It states that a class should be open for extension but closed for modification.
Liskov Substitution Principle
: "Subtypes must be substitutable for their base types."
Interface Segregation Principle
: A class should not be forced to implement interfaces it does not use.
Dependency Injection
: It allows a class to depend on abstractions (interfaces) instead of concrete implementations, improving flexibility, testability, and maintainability.
Stack - saves function calls of java program. local variable and method calls. Reference of object is stored in stack. heap = saves object which is created by new keyword. Actual object is stored in heap