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 ....



Java Servlet and JSP Example

In this article we will demonstrate a simple Servlet and JSP example using the maven cargo plugin from the command line. We will also cover, albeit briefly, the functioning of both Servlet and JSP constructs within the Servlet Container in terms of how they are used to satisfy a HTTP request. The sample application will greet you with your name, ...

Read More »

Spring REST with JSON Example

RESTful web services using JSON data format address the problems with SOAP web services using XML. REST can output data in different formats like Comma Separated Values (CSV) or Really Simple Syndication (RSS), but the most popular format is JSON. Compared to XML, JSON is not only more human readable but also lightweight. It’s easier for the browser to take ...

Read More »

Java 8 Collect vs Reduce Example

Hello readers, this tutorial explains the concept of reducing and collecting in Streams and Collector’s API respectively. 1. Introduction 1.1 Stream’s reduce() Method Let’s take a look at the Streams API’s reduce() method and how it can be used to perform reduction operations on the streams of data. 1.1.1 What is ‘reducing’ in the context of Streams? Reducing in the ...

Read More »

Java 8 Comparator Example

Hello readers, this tutorial explains how to use Lambda expressions in order to improve the boilerplate code of the Comparator written for sorting the list collections. 1. Introduction The comparator interface has undergone a major overhaul in Java8 while still retaining its essence which is to compare and sort objects in the collections. Comparator now supports declarations via lambda expressions ...

Read More »

Spring Boot JDBC Example

Do you want to learn about using Spring Boot with JDBC? Yes? Then you have come to the right place. This example is very straight forward and simple, even a 12 year old can understand. Let’s begin with our Spring Boot JDBC example. 1. Tools Apache Maven Mars Eclipse Spring Boot H2 Database Engine 2. Assumptions This article assumes that ...

Read More »

Apache ActiveMQ File Transfer Example

1. Introduction Apache ActiveMQ (AMQ) is a message broker which transfers messages from sender to receiver. In this example, I will build two simple AMQ applications which will transfer files from one location to another: A producer sends a file via BytesMessage or BlobMessage A consumer receives the BytesMessage or BlobMessage and saves it as a file 2. JMS Message Type JMS defines six ...

Read More »

Java 8 Consumer and Supplier Example

Hello readers, this tutorial explains the in-built functional interfaces (i.e. Consumer<T> and Supplier<T>) introduced in Java8. 1. Introduction These features are the functional interfaces (i.e. an interface with only one abstract method) which belongs to the java.util.function package. 1.1 What is Consumer? Consumer<T> is an in-built functional interface introduced in Java8 in the java.util.function package. The consumer can be used ...

Read More »

Java 8 Convert a Stream to List Example

Hello readers, this tutorial explains how to convert a Stream to a List with the help of the following examples. 1. Introduction One of the common problem while working with the Stream API in Java 8 is how to convert a Stream to List in Java because there is no toList() method present in the Stream class. When developers are ...

Read More »

Java 8 Streams: allMatch(), anyMatch(), noneMatch() Example

Hello readers, Java 8 Matching with Streams tutorial explains how to match the elements in a stream using the allMatch(), anyMatch() and noneMatch() methods provided by the Streams API. Table Of Contents 1. Introduction 1.1 Stream.allMatch() method 1.2 Stream.anyMatch() method 1.3 Stream.noneMatch() method 2. Java 8 Streams Example 2.1 Tools Used 2.2 Project Structure 2.3 Project Creation 3. Application Building ...

Read More »

Apache ActiveMQ Distributed Queue Tutorial

Apache ActiveMQ (AMQ) is an open source messaging server written in Java, which implements JMS 1.1 specifications. In this article, I will demonstrate how to utilize a distributed queue within a group of AMQ brokers. Table Of Contents 1. Introduction 2. Apache ActiveMQ Server Installation 3. Producer Java Application 3.1. MessageProducerApp 3.2. QueueMessageProducer 3.3. Export MessageProducerApp as a Jar 4. ...

Read More »