What is the difference between composition and inheritance? Which is preferable?
Senior
174
What is the difference between composition and inheritance? Which is preferable?
What is String, why is it immutable? What happens during concatenation?
What is StringBuilder and how does it differ from String and StringBuffer?
Explain the principles of SOLID and why they are needed in development.
How is the hashCode of an object generated by default in Java?
What are generics and why are they needed?
When should the Dependency Inversion principle be applied, and when not (related to YAGNI)?
Tell me about equals and hashCode: the contract, why hashCode is needed