Java-Interface-and-Various-Types-of-Interfaces-1-1

Java Interface and Various Types of Interfaces

Hey, Tea lovers! before talking about Java Interface, Have you ever heard the phrase, “Man Of Many Faces”? if not, it means a person can be of everything or anything when it comes to portraying something. It can be one thing and a minute after another without losing its strength. Java’s interface fits perfectly with this title. It is an integral part of java and has become so powerful over the years, that it shifted the way a Java programmer thinks. It has added various ways of doing things in Java. Depending on the number of methods only, an interface’s definition as well as the object-creating process changes. ...

May 14, 2021 · 5 min · Imran Shaikh
How to Use partitioningBy Collector in Java Stream API

How to Use partitioningBy Collector in Java Stream API

Hey, tea lovers! Today I will be talking about the partitioningBy Collector method of Stream API. I will be focusing on what is partitioningBy by method, where, and how to use it with different examples. I have already discussed How to use groupingBy Collector in Java Streams. Both partitioningBy and groupingBy are the java.util.stream.Collectors. partitioningBy is a terminal operation of the Stream API pipeline. ...

January 22, 2021 · 5 min · Imran Shaikh
How to use groupingBy Collector in Java Streams

How to use groupingBy Collector in Java Streams

Hey, Tea lovers! Today we will talk about the groupingBy Collector method of Java Stream API. Yes, it is similar to GROUP BY of SQL since it groups and collects the objects based on a given condition or value. In case you want to get familiar with the Stream API, I recommend you to read the post " Be More Functional with Java’s Functional Interfaces" and " Stream API: The Hero Without a Cape". These will help you understand the post and might refresh your memory if you already know. Prepare your tea then, to sip and code. ...

October 15, 2020 · 5 min · Imran Shaikh
Basic to Advance ways to iterate over a List in Java (1)

Basic to Advance ways to iterate over a List in Java

Hey, Tea Lovers! Collection Framework is a very powerful library in Java. Every update in Java adds some more interesting features to this. Today, we will go over how you can iterate over a List, be it ArrayList, LinkedList, or any other. We will take a look at them in ascending order from the basic loop to iteration to Stream API. And also, figure out which one is best suitable for our requirements. So, make your tea and get ready to sip and code. ...

August 27, 2020 · 5 min · Imran Shaikh
Stream API The Hero Without a Cape

Stream API: The Hero Without a Cape

Hey Tea Lovers! In this post, we will be talking about an unsung hero of the Java world, the Stream API which was added to Java 8 and has changed the way we do programs in java and how! It added neatness as well as made the program more readable. It helps you do functional programming in Java. Without any further ado, let us read more about this jewel. What is Stream API The Stream API, included in Java 8, is utilized for processing collections of objects. It is the flow of Objets on which various methods get applied in the pipeline to have the result. Simply put, it flows through the given Collection<Object> and applies the different methods on the Object to aggregate them into the desired result without affecting the original Object. ...

May 11, 2020 · 9 min · Imran Shaikh
Functional Interfaces To Become More Functional in Java

Functional Interfaces in Java

Hey! tea lovers. This post is about Java’s functional interfaces. We will talk about the basic ones briefly. These functional interfaces are used by Stream API heavily, so knowing them will give you a huge advantage. Not just streams you can use it anywhere. Prerequisites for Functional Interfaces Not much, Just make sure the concept of functional interfaces and lambdas are clear. You can find the code on GitHub here or the full project here. And yes fill your cup of tea to sip and learn with me. ...

May 9, 2020 · 6 min · Imran Shaikh