Tag: Java

A Deque is a linear collection that supports element insertion and removal at both ends. The name deque is short for “double ended queue” and is usually pronounced “deck”. The Deque interface defines methods to access the elements at both ends of the deque. Methods are provided to insert, remove, and examine the element. Each […]Continue reading

In Java, you use the enumeration type to represent a list of predefined constants. But, what if you want to implement a Set interface with the enumeration type, you have got EnumSet in Java to do so. Enum constants are unique and have predefined length, as you can not define a new enum constant at […]Continue reading

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