JDK 16 Early Access Build 25 (2020/11/18) includes changes for JDK-8247781 (“Day periods support”). As stated in the JDK 16 Early Access Build 25 Release Notes (“Day period support added to java.time formats”), the new functionality “translates day periods defined in Unicode Consortium‘s CLDR.” In most English-language situations using a “12-hour clock“, the “day periods” might be used instead of ...
Read More »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 predict the example. Imagine a JWT signature. You can match ...
Read More »Constrast DataWeave and Java mapping operations
Main points: DataWeave 2.0 provides mapping capabilitiesJava and DataWeave can achieve the same mappingsDataWeave mapping operator is less verbose than Java DataWeave map operator The DataWeave 2.0 (Mule 4) map operator shares similarities with the map() method from Java’s Stream class. Mapping is a transformative operation The idea of mapping is to transform each element of an array and output ...
Read More »Saving JetBrains MPS models in a database using Modelix
JetBrains MPS is our tool of choice to build Domain Specific Languages targeting professionals who are not developers. MPS is a great choice but over several projects we ran into specific issues for which we are researching an answer. In this article we see how we can solve one of these issues by using Modelix to store MPS models into ...
Read More »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”, “BCA”, “CBA”, “CAB”. The approach I took is to go with ...
Read More »GC Logs changes for migrating from JDK 8 to JDK 11
Problem Moving from JDK 8 to JDK 11 is quiet subtle. One issue which many people have faced is regarding is GC Logs. Solution JDK 11 uses generic logging mechanism. So flags like PrintGCDetails, PrintGCDateStamps don’t work anymore. The new format is easy to use once you understand it. Format is : 1 [tag selection][:[output][:[decorators][:output-options]]] There are 4 sections to ...
Read More »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. Overview In this article, you’ll learn how to find the transpose of a given matrix using a simple for loop. You can go thorough the previous articles on addition and multiplication of two ...
Read More »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. Overview In 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 the below topics is required to understand the ...
Read More »Selection Sort in Java with Algorithm, Example
A quick and practical programming guide to selection sort technique in java with along with the algorithm and examples. Selection Sort in java In this tutorial, We will learn aboutanother sorting technique where auxiliary space is minimized. As of now we have discussed about the following Implementation of Bubble SortImplementation of Optimized Bubble SortImplementation of Insertion SortSeveral Java Example programs ...
Read More »