Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

Git Pull Refusing to merge unrelated histories Example

In this blog post, we will take a quick look at Git and the problem of unrelated histories during Git merge. We will also look at a way to solve the unrelated history problem. 1. Introduction to Git Git is a distributed version control system for tracking changes in source code during software development. It is designed for coordinating work ...

Read More »

Java round double value to 2 decimal places Example

1. Introduction A double variable is used to hold a floating point value, such as 12.578. A decimal place is the position of a digit to the right of a decimal point. The 12.578 with 2 decimal places is represented as 12.57. Java has provided PrintStream, String.format, Formatter, NumberFormat, DecimalFormat, and BigDecimal to format and round a number based on ...

Read More »

Spring Boot JWT Authentication Example

Welcome readers, in this tutorial, we will implement the security mechanism with JSON Web Token (popularly known as JWT’s) in a spring boot application. 1. Introduction Spring Boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications that are packaged as jar and are directly started using ...

Read More »

Java Immutable Objects Example

1. Introduction In programming, an object is considered immutable if its state cannot change after it is created. Java not only supports immutable objects but as a best practice, they should be widely used. In this post, we will take a look at how to create immutable objects, their use cases and some examples of immutable Classes. The technologies that ...

Read More »

Java Thread Example

1. Introduction Every Java program has at least one thread, the main thread. This is spun up by the Java Virtual Machine (JVM) when you run your code. Java is multithreaded which means it can utilise multiple threads concurrently. Thankfully, Java makes it easy to work with threads and multithreading. However as developers or programmers we need to take threading ...

Read More »

JSF Form Example

With this example, we are going to demonstrate how to use JSF Form in JavaServer Faces (JSF) to develop a Web Application. 1. What is Java Server Faces (JSF)? JavaServer Faces (JSF) is used as a Component-based web framework that implements a Model-View-Controller design pattern for developing web applications. 2. Overview of JavaServer Faces (JSF) It uses Facelets as its ...

Read More »

Java 11 Standardized HTTP Client API Example

In this article, we will test a REST API application using the Java HTTP Client API. 1. Introduction There are many tools available to test your REST API applications.  There are command line tools, such as cURL, and there are GUI tools, such as Postman and SoapUI that can perform these tasks.  If you are using a Continuous Integration and ...

Read More »

Spring Boot FreeMarker Configuration Example

Welcome readers, in this tutorial, we will implement the Freemarker configuration in a spring boot application. 1. Introduction Spring Boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications that are packaged as jar and are directly started using embedded servlet container (such as Tomcat, Jetty or ...

Read More »

Spring Boot Ehcache Example

Welcome readers, in this tutorial, we will explore EhCache integration with spring boot application. 1. Introduction Spring Boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications that are packaged as jar and are directly started using embedded servlet container (such as Tomcat, Jetty or Undertow). Thus, ...

Read More »

Java Convert Byte[] array to String Example

1. Introduction A byte array is an array of bytes. A byte is binary data with 8 bits which represents an integer with values from -128 to 127. A char is a primitive data type which represents a character. The bytes translate to characters based on the character encoding scheme (such as Unicode, UTF-8, UTF-16, and UTF-32). The String class ...

Read More »