Often times in Java web applications we see that the package structure indicates that a layered architecture is used. In this post we’re going to explore the ideas around what would happen if layers were not the topmost level of organization in an application architecture.
Java 9 introduced three new methods to the Optional class. This post covers what they do and how to use them.
This post will cover how you can use OS environment variables to pass configuration values to a Spring Boot application.
Version control systems play a vital role in tracking the history of changes in a codebase. Knowing how to write good commit messages is an essential skill if you wish to have your project’s history well documented.
Arguably one of the most noteworthy new features introduced in Java 8 was the Streams API. Java 9 offers two new stream operations—takeWhile and dropWhile.
Nearly all Spring projects that I have worked with make heavy use of field injection. This must be a popular approach because it is concise and reads well. But have you ever considered the downsides of field injection?
A while loop is a control flow statement that runs a piece of code multiple times. It consists of a loop condition and body. Java also has a do while loop.
The ternary operator is a form of syntactic sugar for if-then-else statements. It is also known as the conditional operator, which is perhaps a more meaningful name because it evaluates conditions like if does.
The if statement is the most basic conditional statement. It checks a condition, which is any boolean expression, and runs a block of code if it is true.