In this post, we will discuss the the usage of double brace initialization technique in Java. Get great deals at Amazon
In this post, we will see how to insert an element into an array at specified index in Java. The insertion should shift the element currently at that index and any subsequent elements to the right by one position.
In this post, we will discuss how to remove an element at the specified position from an integer array in Java.
In this post, we will discuss how to remove all occurrences of the specified element from an integer array in Java.
In this post, we will see how to initialize a list in Java in single line with specified value.
We have already covered how to flatten a Stream using flatMap() and concat() methods in Java 8. In this post, we will flatten a Stream in Java 8 using Stream.forEach() method.
In this post, we will discuss how to shuffle or randomize a List in Java using Fisher–Yates shuffle algorithm and shuffle() method provided by the Collections class.
In this post, we will see how to clone a List in Java. We need to construct a list containing the elements of the specified list, in the same order as the original list. Assume there are no mutable objects in the list. i.e. the code can perform a shallow copy.
Java 8 Streams can holds different types of data. For example, Stream<T>, Stream<T>, Stream<List<T>> – all these are valid streams in Java 8. We have seen in the previous post that flatMap() method can be used for flattening Streams in Java. In this post, we will flatten Stream of Arrays or Lists using Stream.concat() method …
In this post, we will discuss flatMap() method in Java which is used to flatten Streams in Java.
In this post, we will discuss how to generate an IntStream in decreasing order. In other words, generate integers in specified range from high to low using Streams in Java.
In this post, we will see how to capitalize first character of each word in a given text.