Fixes missing eager/lazy initialization examples for Hacktoberfest co…
feat: Add eager and lazy initialization examples for Singleton pattern
- Add EagerInitializedSingleton with class loading time initialization
- Add LazyInitializedSingleton with synchronized lazy loading
- Update App.java to demonstrate both approaches with clear logging
- Update README.md with comprehensive documentation for all singleton types
- Add corresponding unit tests for both implementations
- All tests passing (21/21)
⏳ Analyzing changes in this PR... ⏳
This might take a few minutes, please wait
📥 Commits
Analyzing changes from base (ede37bd) to latest commit (1cfbf30):
- 1cfbf30: Fixes missing eager/lazy initialization examples for Hacktoberfest contributors
📁 Files being considered (6)
🔄 singleton/README.md (2 hunks) 🔄 singleton/src/main/java/com/iluwatar/singleton/App.java (1 hunk) ➕ singleton/src/main/java/com/iluwatar/singleton/EagerInitializedSingleton.java (1 hunk) ➕ singleton/src/main/java/com/iluwatar/singleton/LazyInitializedSingleton.java (1 hunk) ➕ singleton/src/test/java/com/iluwatar/singleton/EagerInitializedSingletonTest.java (1 hunk) ➕ singleton/src/test/java/com/iluwatar/singleton/LazyInitializedSingletonTest.java (1 hunk)
autogenerated by presubmit.ai
This PR is stale because it has been open 60 days with no activity.