You know about interfaces, right? Like Runnable, Callable, etc., but when you hear the name Throwable, what do you think? Is it an interface or not? Many people are confused because it also ends with ...
As a Java developer, I’ve always felt that try-catch blocks add a lot of unnecessary noise to the code. We often copy-paste the same exception handling patterns again and again, which leads to ...
Error handling, also called exception handling, is a big part of Java, but it’s also one of the more divisive elements. Exception handling allows a developer to ...
Java interfaces are different from classes, and it’s important to know how to use their special properties in your Java programs. This tutorial introduces the difference between classes and interfaces ...
Logging and exception handling are like two peas in a pod. When a problem happens in your Java code, that typically means you have an exception that needs to be ...
Java’s compile-time checking does a pretty good job of keeping exceptions safely caged—you can’t call a method that throws a checked exception without catching the exception or declaring that your own ...
Some exceptions in Java must be handled in the developer's code. Other exceptions can occur without any exception handling semantics at all. When an exception must be handled with try-and-catch ...