Home » Java » Page 10

Java

More Frequent Java Long-Term Releases

A little over four years ago, Mark Reinhold (Chief Architect of the Java Platform Group at Oracle) stated in his blog post “Moving Java Forward Faster“: “For Java to remain competitive it must not just continue to move forward — it must move forward faster.” In that post, Reinhold proposed “that after Java 9 we adopt a strict, time-based model with a ...

Read More »

JDK 18: Code Snippets in Java API Documentation

OpenJDK 18 Early-Access Build 16 (2021/9/23) is now available and includes the implementation for JEP 413 (“Code Snippets in Java API Documentation“), which is targeted for JDK 18. The objective of JEP 413 is to “introduce an @snippet tag for JavaDoc’s Standard Doclet, to simplify the inclusion of example source code in API documentation” and the JEP itself covers the ...

Read More »

The Premium Java Programming Certification Bundle

Master The Ins & Outs of Java Programming Then Learn Useful Software Principles, Ace Interviews, and Become an Industry-Ready Programmer Hey fellow geeks, This week, on our JCG Deals store, we have another extreme offer. We are offering a massive 98% off on The Premium Java Programming Certification Bundle. Get it now with only $29,99 instead of the original price ...

Read More »

Cloud Build and Gradle/Maven Caching

One of the pain points in all the development projects that I have worked on has been setting up/getting an infrastructure for automation. This has typically meant getting access to an instance of Jenkins. I have great respect for Jenkins as a tool, but each deployment of Jenkins tends to become a Snowflake over time with the different set of ...

Read More »

Kivakit Build

java-interview-questions-answers

A poor man’s multiple-repository build system Refactoring feature branches across multiple repositories A common use case when working with multiple, dependent repositories is to use git flow to create multiple feature branches: kivakit [feature/simplify-log-api] kivakit-extensions [feature/simplify-log-api] If project(s) in kivakit-extensions here depend on projects in kivakit, refactoring code in kivakit can propagate code changes to kivakit-extensions. Then both feature branches ...

Read More »

KivaKit deployments

java-interview-questions-answers

KivaKit applications can be configured using the settings api, but there is an easier way to configure an application for deployment built right into Application. By default, Application looks for the switch -deployment=[deployment-name]. If the switch is present and deployment settings can be found, KivaKit will load all of the settings objects in the named deployment into the global settings ...

Read More »

From layers to onions and hexagons

java-interview-questions-answers

In this post we will explore the transition from a classic layered software architecture to a hexagonal architecture. The hexagonal architecture (also called ports and adapters architecture) is a design pattern to create loosely coupled application components. This post was inspired by a German article from Silas Graffy called Von Schichten zu Ringen – Hexagonale Architekturen erklärt. Classic layers Layering ...

Read More »

Java’s Optional Does Not Supplant All Traditional if-null-else or if-not-null-else Checks

Java‘s addition of java.util.Optional has been welcome and had led to more fluent code for methods that cannot always return non-null values. Unfortunately, Optional has been abused and one type of abuse has been overuse. I occasionally have run across code that makes use of Optional when there is no clear advantage over using null directly. A red flag that ...

Read More »

Java 17: Pattern Matching for Switch

In Java 17 (released only a few days ago), Pattern Matching for switch has been introduced as a preview language feature, which allows case labels with patterns rather than just constants. Here is an example showing how you can match on type patterns: public static String typedPatternMatching(Object o) { return switch(o) { case null -> "I am null"; case String ...

Read More »