Practical Guide to Java Stream API

Stream API was introduced in Java 8. It provided a declarative programming approach to iterate and perform operations over a collection. Until Java 7, for and for each were the only options available, which was an imperative programming approach. In this article I will introduce you to the Stream API... [Read More]
Tags: java

Practical Guide to Java 8’s Date Time API

I will be covering the features of the Java 8’s Date Time API from a practical standpoint, which means those features that a developer uses on a daily basis. This API was introduced as part of the JSR-310. In addition to improvements over existing Date and Calendar in representing date... [Read More]
Tags: java

Java 8 Optional as a Monad

Lately there has been lot of discussions around functional programming and object oriented programming and their differences. A few functional programming constructs had also been introduced in Java 8 release a couple of years back. Since then I have been exploring functional programming and I have realized that using a... [Read More]

REST Error Responses in Spring Boot

The format of error responses from REST web services has always been a topic of grey area for me. According to me, whatever format you choose, it should give enough information to the clients, consuming the REST web services, so that the clients can handle the error situations gracefully. Spring... [Read More]
Tags: java spring