Java Weekly, Issue 390
1. Spring and Java >> CopyOnWriteArrayList and Collection#toArray() [javaspecialists.eu] Deep into safe usage of the CopyOnWriteArrayList. If you haven't been working on concurrency lately, this...
View ArticleCapturing Image From Webcam In Java
1. Overview Usually, Java doesn't provide easy access to the computer hardware. That's why we might find it tough to access the webcam using Java. In this tutorial, we’ll explore a few Java libraries...
View ArticleCommand Line Arguments as Maven Properties
1. Overview In this short tutorial, we'll look at how we can pass arguments to Maven using the command line. 2. Maven Properties Maven properties are value placeholders. First, we need to define them...
View ArticleGuide to the ModelAssert Library for JSON
1. Overview When writing automated tests for software that uses JSON, we often need to compare JSON data with some expected value. In some cases, we can treat the actual and expected JSON as strings...
View ArticleConnection Timeout vs. Read Timeout for Java Sockets
1. Introduction In this tutorial, we'll focus on the timeout exceptions of Java socket programming. Our goal is to understand why these exceptions occur and how to handle them. 2. Java Sockets and...
View ArticleWhat Does Mono.defer() Do?
1. Overview In Reactive Programming, there are many ways we can create a publisher of type Mono or Flux. Here, we'll look at the use of the defer method to delay the execution of a Mono publisher. 2....
View ArticleJava DocLint
1. Overview There are so many reasons why using Javadoc is a good idea. For example, we can generate HTML from our Java code, traverse through their definitions, and discover various properties related...
View ArticleA Comparison Between JPA and JDBC
1. Overview In this tutorial, we're going to look at the differences between the Java Database Connectivity (JDBC) API and the Java Persistence API (JPA). 2. What Is JDBC JDBC is a programming-level...
View ArticleLogical vs Bitwise OR Operator
1. Introduction In computer programming, the use case of OR is that it is either a logical construct for boolean logic or a bitwise mathematical operation for manipulating data at the bit level. The...
View ArticleCluster, Datacenters, Racks and Nodes in Cassandra
1. Introduction In this tutorial, we'll have a close look at Cassandra's architecture. We'll find out about data storing in a distributed architecture, and we'll discuss basic architecture components....
View ArticleRunning Selenium Scripts with JMeter
1. Overview In this tutorial, we'll discuss the steps to run Selenium scripts with JMeter. 2. Selenium Scripts with JMeter JMeter provides an open-source solution for performance and load testing. It...
View ArticleMonitor the Consumer Lag in Apache Kafka
1. Overview Kafka consumer group lag is a key performance indicator of any Kafka-based event-driven system. In this tutorial, we'll build an analyzer application to monitor Kafka consumer lag. 2....
View ArticlePrivate Constructors in Java
1. Introduction Private constructors allow us to restrict the instantiation of a class. Simply put, they prevent the creation of class instances in any place other than the class itself. Public and...
View Article3DES in Java
1. Introduction 3DES or Triple Data Encryption Algorithm is a symmetric-key block cipher that applies the DES cipher algorithm three times to each data block. In this tutorial, we'll learn how to...
View ArticleIntroduction to Spring Native
1. Overview Native images provide various advantages like an instant startup and reduced memory consumption. Therefore, at times, we might want to build a native image of our Java application. In this...
View ArticleCollection.toArray(new T[0]) or .toArray(new T[size])
1. Overview The Java programming language provides arrays and collections to group objects together. Mostly, a collection is backed by an array and modeled with a set of methods to process the elements...
View ArticleGenerating Alphanumeric UUID String in Java
1. Overview UUID (Universally Unique Identifier), also known as GUID (Globally Unique Identifier), is a 128-bit value that is unique for all practical purposes. Their uniqueness doesn't depend on a...
View ArticleEnabling Logging for Apache HttpClient
1. Overview In this tutorial, we'll show how to enable logging in Apache's HttpClient. Additionally, we'll explain how logging is implemented inside the library. Afterward, we'll show how to enable...
View ArticleCommon Shortcuts in Eclipse
1. Overview Many developers rely heavily on keyboard shortcuts to work efficiently in their IDE of choice. In this tutorial, we're going to learn about some of the common shortcuts in the popular...
View ArticleExpose More Than One Port With Docker
1. Overview When we dockerize our applications, we usually need to expose one port. The application uses that port to interact with other containers or the outside world. Sometimes, one port is not...
View Article