Java 8 has introduced a new abstraction called Stream, letting us processing data in a declarative way. Furthermore, streams can leverage multi-core architectures without you having to write a single line of multithread code.
Deep cloning of object has always been something that every Java developers work on so frequently. There are a lot of articles talking about a different way to clone objects deeply and obviously, the preferred method is to use Copy Constructors since it overcomes the design issues of Object.clone() and provides better control over object construction.
This has been one of the popular programming tasks for Java developer, particularly focusing on text processing.
This has been one of the most frequently asked questions in Java interviews. With streams introduced after Java 8, this can be achieved in an elegant and functional way.
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.