Exceptions as Flow Control in Java

Exceptions are commonly used for flow control in Java, but how well do they perform compared to return values?

Similar

New JEP Would Simplify Java Type Variance

A new JEP Candidate proposes to facilitate the handling of type variance in Java. The new proposal, potentially targeting Java 10, would add a means for specifying the default variance in the definition of generic types, different to the current style of ...

Read more »

Java SE 9 First Look

Oracle has finally released Java SE 9, now available on the Oracle Technology Network. As usual the official end-user portal java.com will switch versions later, so for now it still distributes Jav… (more…)

Read more »

Measuring Time: From Java to Kernel and Back

Problem Statement Even the most basic problems become interesting when you dig deep enough. Today, I would like to do a deep dive into measuring time in Java. We will start with the very basics of the Java API and gradually move lower in our stack: throug... (more…)

Read more »