SoFi · CS Fundamentals
Explain GC, singleton, and OOP principles
TrueInterview
October 7, 2026 · 1 min read
Answer the following Java and software-engineering fundamentals questions:
- Garbage collection. How does Java garbage collection work at a high level (generational GC, marking, compaction), and what are common GC tuning and diagnostic signals?
- Singleton. What is the Singleton pattern? When is it appropriate, what are its common pitfalls (testing, hidden dependencies), and how do you implement it safely in Java (thread safety, lazy versus eager initialization)?
- OOP and SOLID. What core OOP and SOLID principles do you use in object-oriented design, and how do they improve maintainability and extensibility?
Give clear explanations, with small code snippets or examples where helpful.
Hints (3)
Loading comments…