Tag: Java

There are read-only wrappers over collections which are known as unmodifiable lists. These lists do not support any modification operations such as add, remove, and clear. Hence, these kinds of lists which guarantee that no change in the Collection object will ever be visible are termed as immutablelist. The Java Collections framework provides the unmodifiableList() […]Continue reading

Introduction In this article, we will look at Spring Framework’s support of immutable property binding. We described Spring external configuration in this article and also provided a more detailed article about the Java bean properties binding. In this article, we will demonstrate constructor binding using the merchant account configuration in this article. Constructor binding enables […]Continue reading

Introduction In this article, we explained why we should externalise our application configuration data. We also provided configuration examples that use various methods supported by Spring Boot. Within these methods was the Java bean properties binding but it was less detailed. Therefore in this article, we are going to give more details about using the […]Continue reading

jEnv is a command line to that for Linux and OS X that makes setting the JAVA_HOME environment variable simple. Windows users can use jEnv from a Linux subsystem. Installation To install jEnv on Linux or OS X will first clone the git repository to our home directory using this command: $ git clone https://github.com/gcuisinier/jenv.git […]Continue reading

Lists are common data structures in Java. Elements in a List have a specific order and can include duplicate elements. List have different implementations based on different use cases. The two key ones are ArrayList and LinkedList. Novice programmers often tend to use both the implementations interchangeably. However, both ArrayList and LinkedList have significant differences […]Continue reading

In Java, the HashMap and HashTable are both data structures that store data in key value pairs. When you store data in these, the key value is hashed, then is used as an index for fast access to the stored data. HashMap vs Hashtable HashMap Hashtable Introduced in Java 1.2 Introduced in Java 1.0, considered […]Continue reading

Sorting collections in Java is a common task. Java provides several different ways we can sort Collections. In this article, we will discuss the options we have to sort collections in Java. Understanding the java.util.Collections.sort() Method The java.util.Collections.sort() method is a crucial utility in the Java programming language, designed to order elements within a list. […]Continue reading