Inject Dependencies – Manually

In another post, “Do I Really Need a Singleton?”, I wrote about the problems introduced by the Singleton design pattern. When the single unique instance is being accessed through the getInstance() method, Singleton acts as a global variable in disguise and introduces tight coupling and unwanted dependencies. I have received two immediate questions from my … Continue reading Inject Dependencies – Manually

Problems with Checked Exception in Java

Recap: Exception Hierarchy In Java In Java, we have three types of Throwables : Error and it’s subclasses Runtime Exception and it’s subclasses And the rest (Non-Runtime Exceptions) Exceptions those lie in the third category are called Checked Exceptions. If a method throws a checked exception, the compiler makes sure that the API user handles … Continue reading Problems with Checked Exception in Java