Posts related to tag: Java


Java- Sort Even Number First and Maintain the Order

Sort Even Number First and Maintain the Order in Java: You have an array of integers with mixed numbers i.e. […] Continue reading »

Java Pattern Matching for Switch

Java 17 brings a new language feature called Pattern Matching for Switch as a preview. This feature allows case labels […] Continue reading »

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 »

Sealed Interface in Java 17

In Java, a sealed interface is a feature introduced in Java 17 to restrict which classes can implement an interface. […] Continue reading »

Java 17 Sealed Classes

Java 17, the latest Long-Term Support (LTS) version, introduces several new features and enhancements aimed at improving code readability, maintainability, […] 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 Map.of() vs Map.ofEntries() Method

In Java, the Map.of() and Map.ofEntries() static factory methods were introduced in Java 9 as part of the java.util.Map interface […] 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 »

Understanding the Singleton Design Pattern in Java

In terms of software design patterns, the Singleton pattern holds a special place, revered for its ability to ensure that […] 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 »

SOLID Design Principle

SOLID principles are a fundamental set of concepts in object-oriented programming (OOP) that aim to make software designs more understandable, […] Continue reading »

1 2 3 9