Dealing with Exceptions in Java is a must, and functional programming doesn’t make it easier. Let’s take a look at the available options.
Almost every developer knows the phrase “premature optimization is the root of all evil”, coined by Donald Knuth in 1974. But how are we supposed to know what is worthy of being optimized?
When we create a new data structure, deciding on its data types is usually a simple decision: text will become a String, non-floating-point numbers will be int, and so forth. But is it the right choice?
Exception handling is a mechanism used to handle disruptive, abnormal conditions to the control flow of our programs. Let’s take a deep-dive how Java deals with them.
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” –Martin Fowler
We all know String.format(...). But there are other options. Java has multiple ways of formatting, aligning, padding, and justifying Strings.