tag:blogger.com,1999:blog-8712770457197348465.post5044752650022518275..comments2024-03-28T02:47:19.159-07:00Comments on Javarevisited: Why Singleton is Anti Pattern in Java Now and Why you should avoid it? Examplejavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8712770457197348465.post-39609158363685513392021-07-21T05:23:33.728-07:002021-07-21T05:23:33.728-07:00I'll agree using dependency injection does mak...I'll agree using dependency injection does make life easier (for the reasons you mention), but something still needs to manage the lifecycle (creation/destruction) of the MailService and inject it where it needs to be injected correct? Wouldn't MailService's implementation still be a Singleton, even if it does implement an interface? You wouldn't want multiple instances of it in Anonymoushttps://www.blogger.com/profile/12289839060750771124noreply@blogger.com