Posts related to tag: Java 8


IntStream summaryStatistics() in Java 8

In Java 8, the IntStream interface provides the summaryStatistics() method, which returns an IntSummaryStatistics object describing various summary statistics for […] Continue reading »

Java 8 Collectors.partitioningBy() Method Example

Java 8 Stream API’s Collectors.partitioningBy() method, which offers a powerful way to partition elements of a stream into two groups […] Continue reading »

Java Stream peek() Method Example

In this blog, we’ll explore the Java 8 Stream peek() method, understanding its purpose and demonstrating how it can be […] Continue reading »

Java 8– Find first and all smallest string in List

Using the Java 8 Stream API min method, you can find the first and all smallest strings from a List. […] Continue reading »

Java 8– Find first and all longest strings in List

In Java 8, you can find the first and all longest strings from a list using the Stream API along […] Continue reading »

Java 8- Count the occurrences of Character in String

In this Java 8 program, you will find how to  count the frequency of character in String using Stream API. […] Continue reading »

Functional Interface in Java 8

Java 8 introduced a significant enhancement known as lambda expressions, which allowed for more concise and expressive code. Alongside lambda […] Continue reading »

forEach() vs. forEachOrdered() in Java Stream

When working with Java Streams, you often encounter situations where you need to apply a function to each element of […] Continue reading »

Finding a Specific Digit in a Number using Java

On this page, we’ll explore a simple yet common problem: finding a specific digit in a given number using Java. […] Continue reading »

Exploring the Optional in Java 8

Java 8 introduced several new features to the language, including the Optional class. This class was introduced to address the […] Continue reading »

Overview of Java 8 Date and Time API

Java 8 introduced a modern Date and Time API to address the shortcomings of the older java.util.Date and java.util.Calendar classes. […] Continue reading »

1 2 3 5