(published) Height of a Balanced Tree

1. Overview In this tutorial, we’ll introduce a balanced Binary Search Tree. Moreover, we’ll learn about what is the height of a tree and show that in a balanced tree with nodes it is . We’ll also use Big-O notation to approximate the tree height. We assume having a basic knowledge of Binary and Binary […]

Guide to Spring Retry

1. Overview Spring Retry provides an ability to automatically re-invoke a failed operation. This is helpful where the errors may be transient (like a momentary network glitch). In this tutorial, we’ll see the various ways to use Spring Retry: annotations, Spring Expression Language, RetryTemplate, and callbacks. 2. Maven Dependencies Let’s begin by adding the spring-retry […]

Introduction to keytool

1. Overview In this short tutorial, we’re going to introduce the keytool command. We’ll learn how to use keytool to create a new certificate and check the information for that certificate. 2. What Is keytool? Java includes the keytool utility in its releases. We use it to manage keys and certificates and store them in a […]

Adding Text to an Image in Java

1. Overview Sometimes we need to add some text to an image or a set of images. Doing this manually is easy using an image editing tool. But when we want to add the same text in the same way to a significant number of pictures, it would be very useful to do this programmatically. […]

Difference (published)Between request.getSession() and request.getSession(true)

1. Overview In this quick tutorial, we’ll see the difference between calling HttpServletRequest#getSession() and HttpServletRequest#getSession(boolean). 2. What’s the Difference? The methods getSession() and getSession(boolean) are very similar. There’s a small difference, though. The difference is whether the session should be created if it doesn’t exist already. Calling getSession() and getSession(true) are functionally the same: retrieve the current session, and […]