Friday, November 27, 2020

Testing with Hoverfly and Java Part 4: Exact, Glob and Regex Matchers

Previously we used Hoverfly among its state feature.So far our examples have been close to an absolute request match, thus on this blog we will focus on utilising the matchers.Having a good range of matchers is very important because most API interactions are dynamic and you can’t always...

Wednesday, November 25, 2020

CompositeName size() method in Java with Examples

The size() method of a javax.naming.CompositeName class is used to return the size of the composite name object which is equal to the number of components in this composite name.Syntax:public int size()Parameters: This method accepts nothing.Return value: This method returns nonnegative number of components in this composite name.Below...

Monday, November 23, 2020

Java Program to Find Transpose of a Matrix

A quick and practical guide to calculate the matrix transpose in java. Transpose of a given matrix is nothing but the changing the values and order.1. OverviewIn this article, you’ll learn how to find the transpose of a given matrix using a simple for loop.You can go thorough...

Friday, November 20, 2020

Permutation – Heap’s Algorithm

This is a little bit of experimentation that I did recently to figure out a reasonable code to get all possible permutations of a set of characters. So say given a set of characters “ABC”, my objective is to come up code which can spit out “ABC”, “ACB”, “BAC”,...

Wednesday, November 18, 2020

Java Program to Print Multiplication Table For Given Number

A quick example program to create multiplication table in java using simple for loop and while loops.1. OverviewIn this article, you’ll learn how to generate and print multiplication table in java for a given number.This can be done using for loop and while or do while loops.Knowledge on...

Wednesday, November 11, 2020

Java Program to Bubble Sort(Sinking Sort)

Bubble Sort in Java | Sinking Sort TechniqueBubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The algorithm, which...

Monday, November 9, 2020

How to create PDF File in Java – iText Example

Generating PDF files in today’s enterprise applications is quite common. Doing this with Java is not an easy task as Java does not gives default api’s to handle PDF files. No worries, iText jar is for you. If you are not familiar,  iText is a free Java-PDF library...

Friday, November 6, 2020

Memento Pattern

Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later.ParticipantsMemento: stores internal state of the Originator object. The memento may store as much or as little of the originator’s internal state as necessary at its originator’s discretion....

Wednesday, November 4, 2020

Java Based Akka application Part 2: Adding tests

On the previous blog we focused on spinning up our first Akka project.Now it’s time to add a test for our codebase.First thing to get started is adding the right dependencies to the existing project.<dependencies>        <dependency>            <groupId>com.typesafe.akka</groupId>       ...

Monday, November 2, 2020

Java Based Akka application Part 1: Your base Project

Akka is a free, open-source toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM. Along with Akka you have akka-streams  a module that makes the ingestion and processing of streams easy  and Alpakka, a Reactive Enterprise Integration library for Java and Scala,...

Pages (26)1234567 »