Learn the difference between checked vs unchecked exceptions in Java, with simple explanations and examples. Learn Java exception handling best practices.
This post is in continuation to exploring little known features of java. In previous post, I have covered “Instances of same class can access private members of each other” and Some very surprising usage of class sun.misc.Unsafe. In this post, I am discussing about a little known feature of initializes blocks. Initializers can be used […]
NullPointerException is an unchecked exception and extends RuntimeException. It doesn’t force you to use catch block to handle it. NullPointerException is very much like a nightmare for most of java developer community. They usually pop up when you least expect them. I have also spent a lot of precious time while looking for reasons and […]
In this Java tutorial, learn about asynchronous and synchronous exceptions in Java. Learn how they are different with checked and unchecked exceptions. 1. Asynchronous and synchronous exceptions Normally Java differentiate the exceptions in two categories on basis of “timing” when they are discovered. These categories are checked and unchecked exceptions. Similarly, on the basis of […]
We have been using handling java custom exceptions in our code for almost every industry standard application. Usual approach is to create some custom exception classes extending the base