Posts from Java

Comparable and Comparator in Java with examples

By Divya Junuthula

Firstly, This tutorial describes the detailed information about the difference between interfaces comparable and comparator in Java with examples. And we will learn the usage of bo.... Read More

Java : How to get the last element of a stream?

By Niwedita Kumari

In this, we are going to understand how we can get the last element of a stream in Java. This can be done via reduce or skip methods in Java. 1. Using Stream.reduce() : Stream.redu.... Read More

Arrays.fill() in Java with examples

By Ekta Sharma

In this tutorial, we will understand Arrays.fill() in Java. Fill is a method of Arrays class in Java. Now let’s understand these terms. Understanding Arrays.Fill() in Java us.... Read More

How to find Entry with largest value in Java Map

By Monika Maheshwari

In this section, we will find the key with maximum value for a given HashMap.Basically, HashMap is used to store <Key, Value> pair in which all the keys are unique. Approach .... Read More

EnumSet in Java

By Divya Junuthula

In this tutorial, we are going to discuss the basic concepts of EnumSet in Java. First of all, EnumSet is a special set implementation of enum types. The EnumSet implements a set i.... Read More

How to find Median in a stream of integers (running integers) in Java

By Deepak Reddy

In this module, we are going to discuss finding the median in a stream of integers using Java. Let us first see what is a Median and how to calculate the median for given numbers. .... Read More

How to traverse through a HashSet in Java

By Sumanth

In this post, we will learn how to traverse through a HashSet in Java. HashSet is one of the most efficient data structures in Java. Here in this post, we will be learning how to t.... Read More

Java program to Check if two trees are Mirror

By Sumanth

In this tutorial, we will see how to check if two given trees are mirror to each other in Java. Checking if two trees are mirror in Java What are mirror trees? Given 2 trees, if mi.... Read More

Related Posts