Thank you all for following this year's Java Calendar. Here is the complete list with all the articles:
If you want to ensure API users can use lambdas to implement your interface, it's important to make sure your code is annotated properly. Check out how to do it.
When you're working with your classes, make sure to use composition when possible for better separation of concerns, among a variety of other reasons. See how it's done.
Learn how you can create and initialize type-safe maps in Java by using two simple utility methods.
If you want to remove elements from a collection quick, fast, and in a hurry, take a look at removeIf(), which should save you a ton of time over manual iterations.
See how, with a handy open-source tool, you can alter your database entities, with standard CRUD operations, in Java.
If you want your code to kick in only when you need it, then lazy initialization is just right for you. See how you can get it working in Java 8.
Want to query your database with Java? See how Speedment and Java 8's streams can help you get to your data.
Using traits can vastly help simplify your code and allow you to reuse components with ease. This example examines using traits with interfaces.
Event sourcing opens up a new way of looking at your database apps. Turn your database into a record of transactions that you can look back to and restart from.
The open-source class MapStream lets you stream over elements as well as pairs of key-value elements, making changes to everything along the way.
JavaFX offers a variety of features that help improve observability, configure various bindings, and combine with reactive libraries.
Lambdas are fantastic, but their popularity might lead to sloppy use. Naming them after specific uses keeps both the compiler and the client happy.
See a QuickSort algorithm in action as an example of Higher Order Functionality. Taking declarative programming to a new level opens new doors to abstraction.
These days, Java developers have a variety of means to execute tasks. From threads to join pools to caching, you have no shortage of options.
If you're going to use JVM, it's important to know what's going on under the hood. Knowing exactly how code flattening works can save you time to put to better use.
Get your black hat — it's time to hack some classes. But because everyone follows the rules, this tip will help squash third-party bugs and deal with non-standard classes.
Java 8's streams, in theory, make it easy to use parallelism. It doesn't always turn out that way, but you can create custom thread pools to expand your resources.
You can use Java and Speedment together to easily analyze your database and generate code and content for it as well.
The .values() method might seem speedy, but it actually creates a copy of your array, adding to your overhead. Doing a bit of extra work yourself will help in the long run.
Moving data off the heap, within reason, can let you work more efficiently while keeping latency low. That way, you can avoid the garbage collection wall for longer.
Merging your streams through concatenation can allow one stream to lazily consume others, saving you time and making your code more efficient.
Using Enums as parameters can greatly enhance the versatility of your methods. This example shows off how Enums can be used to nimbly and simply sort your lists.
Using mappable types in your geometric classes means less inter-class coupling and opens up a more functional path -- where you can apply functions on objects.
Yes, Virginia, there really is a Santa Claus. In fact, there might be a lot of them. Let's do some Java math to see how many Santas it takes to deliver presents around the world.
Follow the Java Holiday Calendar 2016 with small tips and tricks all the way through the winter holiday season. I am contributing to open-source Speedment, a stream based ORM tool and runtime. Please check it out on GitHub.