Pagination and Sorting using Spring Data JPA
1. Overview Pagination is often helpful when we have a large dataset and we want to present it to the user in smaller chunks. Also, we often need to sort that data by some criteria while paging. In...
View ArticleFind Substrings That Are Palindromes in Java
1. Overview In this quick tutorial, we’ll go through different approaches to finding all substrings within a given string that are palindromes. We’ll also note the time complexity of each approach. 2....
View ArticleCalculate Factorial in Java
1. Overview Given a non-negative integer n, factorial is the product of all positive integers less than or equal to n. In this quick tutorial, we’ll explore different ways to calculate factorial for a...
View ArticleIntro to Spinnaker
1. Overview In this tutorial, we’re going to look at Spinnaker, an open-source continuous delivery platform built by Netflix. We can use it to deploy our applications across multiple cloud providers....
View ArticleSpring MVC Interview Questions
1. Introduction Spring MVC is the original web framework from Spring built on the Servlet API. It provides Model-View-Controller architecture that can be used to develop flexible web applications. In...
View ArticleJava Stream Filter with Lambda Expression
1. Introduction In this quick tutorial, we’ll explore the use of the Stream.filter() method when we work with Streams in Java. We’ll show how to use it and how to handle special cases with checked...
View ArticleGuide to the Hibernate EntityManager
1. Introduction EntityManager is a part of the Java Persistence API. Chiefly, it implements the programming interfaces and lifecycle rules defined by the JPA 2.0 specification. Moreover, we can access...
View ArticleGuide to Java Packages
1. Introduction In this quick tutorial, we’ll cover the basics of packages in Java. We’ll see how to create packages and access the types we place inside them. We’ll also discuss naming conventions and...
View ArticleIntelliJ Debugging Tricks
1. Overview In this tutorial, we’ll look into some advanced IntelliJ debugging facilities. It’s assumed that debugging basics are already known (how to start debugging, Step Into, Step Over actions...
View ArticleImplementing a Custom Lombok Annotation
1. Overview In this tutorial, we’ll implement a custom annotation using Lombok to remove the boiler-plate around implementing Singletons in an application. Lombok is a powerful Java library that aims...
View ArticleJava 8 Predicate Chain
1. Overview In this quick tutorial, we’ll discuss different ways to chain Predicates in Java 8. 2. Basic Example First, let’s see how to use a simple Predicate to filter a List of names: @Test public...
View ArticleSorting Arrays in Java
1. Overview In this tutorial, we’ll discuss common methods to sort arrays in ascending and descending order. We’ll look at using Java’s Arrays class sorting method as well as implementing our own...
View ArticleWorking with Primitive Values in Gson
1. Overview In this tutorial, we’re going to learn how to serialize and deserialize primitive values with Gson. Google developed the Gson library to serialize and deserialize JSON. Additionally, we’re...
View ArticleA Guide to Hibernate OGM
1. Overview In this tutorial, we’ll go through the basics of Hibernate Object/Grid Mapper (OGM). Hibernate OGM provides Java Persistence API (JPA) support for NoSQL datastores. NoSQL is an umbrella...
View ArticleJava Weekly, Issue 260
Here we go… 1. Spring and Java >> How Fast is Spring? [spring.io] An overview recent optimizations around startup time and heap usage in Spring Boot 2.1 and Spring 5.1, plus a handful of tips to...
View ArticleJava EE 7 Batch Processing
1. Introduction Imagine we had to manually complete tasks like processing payslips, calculating interest, and generating bills. It would become quite boring, error-prone and a never-ending list of...
View ArticleBufferedReader vs Console vs Scanner in Java
1. Overview In this article, we’re going to walk through the differences between BufferedReader, Console, and Scanner classes in Java. To have a deep dive on each topic, we suggest having a look at our...
View ArticleCreating Java static final Equivalents in Kotlin
1. Overview In this quick tutorial, we’ll discuss static final variables in Java and their equivalent in Kotlin. In Java, declaring static final variables helps us create constants. And in Kotlin, we...
View ArticleSelf-Healing Applications with Kubernetes and Spring Boot
1. Introduction In this tutorial, we’re going to talk about Kubernetes‘s probes and demonstrate how we can leverage Actuator‘s HealthIndicator to have an accurate view of our application’s state. For...
View ArticleTesting Reactive Streams Using StepVerifier and TestPublisher
1. Overview In this tutorial, we’ll take a close look at testing reactive streams with StepVerifier and TestPublisher. We’ll base our investigation on a Spring Reactor application containing a chain of...
View Article