Java 8 flatMap examples

We would be looking at flatMap method in Java 8 streams and Optional. In our last tutorial we looked at map method in Java 8 stream example. Let us start with the examples 1. Flatten a List<List<String>> to List<String> using flatMap Here we have two lists, a list of front-end languages and a list of […]

Read More

command pattern class diagram

Command Pattern with Java examples

This pattern falls under the behavioral design pattern category. In this pattern, the information inside one request is mapped to a single object and then that object is used as required. It encapsulates a whole request as an object called ‘Command’. The ‘Command’ can be identified as a materialized method call. That object often contains […]

Read More

Bridge Design Pattern

What is Bridge Design Pattern?

Bridge Design Pattern falls under the structural design pattern category. This pattern focuses on a limitation in the concept of abstraction. In the context of Java, we use inheritance to develop the concept of abstraction. Several implementation deviations support to achieve the inheritance. However, this permanently binds the implementation to the abstraction limiting the flexibility. […]

Read More

Adapter Pattern Example

What is Adapter Design Pattern?

Adapter design pattern falls under the category of the structural design pattern. The main intention of the Adapter pattern is to make two incompatible interfaces compatible so that two different systems can inter-communicate. Two different systems have completely different interfaces to communicate with outside. The underlying classes or objects will not change but there is […]

Read More

Error: BeanDefinitionStoreException failed to read candidate component class

Following are some of the things that you can check: Cause 1: Compatibility between Java and Spring In this program, the use of Spring 3 has been done but Java 8 is compatible with Spring framework 4.0. The spring framework 4.0 have something known as functional interfaces which are compatible with Java 8. The […]

Read More

Learn Java for free

Java has emerged as one of the popular programming languages used by the developers in the present scenario. Java is purposely used in the development of Android applications and is also used for the back-end development of web applications. With Android devices taking over the world, the need for Java programmers is only going to […]

Read More

What is Facade Design Pattern?

Introduction to Facade Design Pattern Facade design pattern is another pattern from structural design pattern category. This supports loose coupling by hiding the complex details via a simple interface. This pattern introduces a component called facade, which is a simplified interface component. This facade simplifies the responsibilities of the client by standing between the complex […]

Read More