Home » core java

Tag Archives: core java

How to find a Bipartite Graph?

Bipartite Graph

Hello there, in this article we will show how to find if a graph is a Bipartite Graph through detailed examples. 1. Introduction In this article, we will define a bipartite graph, explore the properties of a bipartite graph, document an algorithm used to determine whether a graph is bipartite or not, and implement this algorithm in Java. Finally, we ...

Read More »

Radix Sort in Java

Bipartite Graph

1. Introduction Sorting algorithms were devised in order to make the ordering of elements of a list or array possible. There are many available to choose from, such as Bubble Sort, Quick Sort, Selection Sort, Heap Sort, Merge Sort, just to name a few. Radix Sort is a sorting algorithm that just happens to be fairly efficient. This article will ...

Read More »

Collectors to Map in Java

Bipartite Graph

1. Introduction The Collectors class is in the java.util.stream package. The Collectors class contains static methods which return a Collector to allow for various reduction operations. This article will discuss the toMap and the toConcurrentMap methods. These methods will return a Map or a ConcurrentMap. In addition, we will also be discussing the SortedMap interface. Finally, we conclude this article ...

Read More »

Java 8 CompletableFuture thenAccept Example

Bipartite Graph

Hello. In this tutorial, we will explore the Java 8 CompletableFuture thenAccept method. 1. Introduction Before diving deep into the practice stuff let us understand the thenAccept(…) method we will be covering in this tutorial. CompletableFuture.thenAccept() takes a Consumer and returns CompletableFuture 2. Practice Let us dive into some practice stuff from here and I am assuming that you already ...

Read More »

Java 8 CompletableFuture thenApply Example

Bipartite Graph

Hello. In this tutorial, we will explore the Java 8 CompletableFuture thenApply method. 1. Introduction Before diving deep into the practice stuff let us understand the thenApply(…) method we will be covering in this tutorial. CompletableFuture.thenApply(…) method is inherited from the CompletionStageThe method returns a new CompletionStage (is a Promise object) that when the stage is completed normally, is executed ...

Read More »

Java 8 Stream – findAny() & findFirst() Example

Bipartite Graph

Hello. In this tutorial, we will explain the findAny() and findFirst() methods in java 8. 1. Introduction Before diving deep into the practice stuff let us understand the findAny() and findFirst() methods in java8 programming. Stream.findFirst() – Returns an optional object containing first element of the given stream. It can also return an empty() optional if the stream is emptyStream.findAny() ...

Read More »

Java 8 Stream – count() Example

Bipartite Graph

Hello. In this tutorial, we will explain the count() method introduced in java 8. 1. Introduction Before diving deep into the practice stuff let us understand the count() method introduced in java8 programming. Stream.count() – Returns the number of elements in the stream with or without filter condition being appliedThis is a terminal operation and once consumed the same stream ...

Read More »

SQL Count Function

Bipartite Graph

In this article, we will discuss the COUNT function in SQL, different ways of using it, and how to combine it with other keywords like GROUP BY and HAVING. 1. Introduction Many times, the information we want from a database table is not available in a single row but in a group of rows or in the result of a ...

Read More »

Java 8 Stream – flatMap & Optional Example

Bipartite Graph

Hello. In this tutorial, we will talk and understand the most commonly used Java 8 Stream APIs: the flatMap method and the Optional class. 1. Introduction Before diving deep into the practice stuff let us understand the flatMap method and Optional class in java programming. 1.1 flatMap() method This method is used to convert a stream of collections to a ...

Read More »

Java Keywords Tutorial

Bipartite Graph

1. Introduction In this article, we will look at words Java considers as Keywords. We will explore why they are used and what they are along with some usage examples. 2. What is a Keyword in Java and why do we need them? The Java Compiler uses some reserved words called Keywords to compile and run Java Programs. Each reserved ...

Read More »