Since Java 8, a lot of boilerplate code can be replaced with lambda expressions in our codebase. I really want to put out an article about Streams in Java, but since that carries real value only if we combine them with lambda expressions, I want to write about some ideas about playing around with lambda expressions first.
Java 8 introduced the
Optionalclass to make handling of nulls less error-prone. For example, the following program to pick the lucky name has a null check as:
I'm implementing the EhCache for caching purpose in one of the projects that I've been working on.
With micro-services architecture, we can build flexible and independently deployable software modules or systems that communicate with each other with the light mechanism like HTTP resource API and provide the result. It has many advantages over the monolithic applications as many applications are moving to cloud. Martin and James have written a very good article 'Microservices' on their site, which I think you guys will enjoy reading.
HATEOAS stands for Hypermedia As The Engine Of Application State. The ultimate goal of REST architecture is to decouple the client with the server. That means the rest client interacts with the network application without prior knowledge of how to interact with that particular application. HATEOAS decouples the client and server to a large extent which allows both sides to evolve independently.
Dependency Injection is a technique to wire objects together in a flexible way. So, it also called wiring between objects. It plays a vital role in gluing classes together and at the same time keeping them independent.
Here is an example program to illustrate the class template.
Here is an example program to illustrate multilevel inheritance.
Here is a more practical example of multiple inheritances.
Here is an example program to illustrate single inheritance.