Java Weekly, Issue 227
Here we go… 1. Spring and Java >> Monitor and troubleshoot Java applications and services with Datadog Optimize performance with end-to-end tracing and out-of-the-box support for popular Java...
View ArticleJava Service Provider Interface
1. Overview Java 6 has introduced a feature for discovering and loading implementations matching a given interface: Service Provider Interface (SPI). In this tutorial, we’ll introduce the components...
View ArticleGuide to Java Clock Class
1. Overview In this tutorial, we’re going to look into the Java Clock class from the java.time package. We’ll explain what the Clock class is and how we can use it. 2. The Clock Class Clock was added...
View ArticleIntroduction to AutoFactory
1. Introduction In this tutorial, we’ll give a brief introduction to AutoFactory, from by Google. This is a source-level code generator that helps generate factories. 2. Maven Setup Before we begin,...
View ArticleQuick Guide to the Spring @Order Annotation
1. Overview In this tutorial, we’re going to learn about Spring’s @Order annotation. The @Order annotation defines the sorting order of an annotated component or bean. It has an optional value...
View ArticleManaging Amazon SQS Queues in Java
1. Overview In this tutorial, we’ll explore how to use Amazon’s SQS (Simple Queue Service) using the Java SDK. 2. Prerequisites The Maven dependencies, AWS account settings, and client connection...
View ArticleJava Streams
Stream Basics >> The Java 8 Stream API Tutorial >> Introduction to Java 8 Streams >> Java 8 Stream findFirst() vs. findAny() >> Functional Interfaces in Java 8 Stream Collectors...
View ArticleJava Concurrency
Java Concurrency Basics >> Overview of the java.util.concurrent >> Guide to the Synchronized Keyword in Java >> Guide to the Volatile Keyword in Java >> Java – Difference...
View ArticleAll About String in Java
String Basics: >> Java – Generate Random String >> How to Remove the Last Character of a String? >> Java – Count Occurrences of a Char in a String >> Check if a String is a...
View ArticleWriting to a File in Kotlin
1. Overview In this quick tutorial, we’ll learn about various ways of writing content into a file using Kotlin extension methods – available in its standard library. 2. Kotlin File Extensions Kotlin...
View ArticleSpring Cache – Creating a Custom KeyGenerator
1. Overview In this quick tutorial, we’re going to illustrate how to create a custom key generator with Spring Cache. For an introduction to the above module, please refer to this article. 2....
View ArticleRun an Ant Task with Maven
1. Introduction Maven and Ant are both well-known build automation tools for Java. Although most of the time we’ll only use one of these, there are cases when using the two together makes sense. A...
View ArticleA Guide To Logback
1. Overview Logback is one of the most widely used logging frameworks in the Java Community. It’s a replacement for its predecessor, Log4j. Logback offers a faster implementation than Log4j, provides...
View ArticlePass-By-Value as a Parameter Passing Mechanism in Java
1. Introduction The two most prevalent modes of passing arguments to methods are “passing-by-value” and “passing-by-reference”. Different programming languages use these concepts in different ways. As...
View ArticleThe Command Pattern in Java
1. Overview The command pattern is a behavioral design pattern and is part of the GoF‘s formal list of design patterns. Simply put, the pattern intends to encapsulate in an object all the data...
View ArticleSpring Web Contexts
1. Introduction When using Spring in a web application, we have several options for organizing the application contexts that wire it all up. In this article, we’re going to analyze and explain the...
View ArticleLightweight Ethereum Clients Using Web3j
1. Introduction This tutorial introduces Web3j, a Java implementation of the popular Web3 abstraction library. Web3j is used to interact with the Ethereum network by connecting to Ethereum nodes using...
View ArticleJava Weekly, Issue 228
Here we go… 1. Spring and Java >> Check the quality of Kotlin code [blog.frankel.ch] Finally, static code analyzers for Kotlin are emerging – let’s hope they will be production-ready soon....
View ArticleThe Tomcat java.net.BindException: Address Already in Use Error in Java
1. Overview In this quick tutorial, we’ll look at what causes the common java.net.BindingException Error: Address already in Use error and how we can deal with it. 2. When Does the Error Occur? As we...
View ArticleLambda Expressions in Kotlin
1. Overview In this article, we’re going to explore Lambdas in the Kotlin language. Keep in mind that lambdas aren’t unique to Kotlin and have been around for many years in many other languages....
View Article