Home » Author Archives: Mohammad Meraj Zia

Author Archives: Mohammad Meraj Zia

Mohammad Meraj Zia
I did my Engineering in Information Technology from IET, Lucknow, India. Currently doing MSc in Information Technology from Derby University. I have worked in Java/J2EE domain for the last 10 years. Have good understanding of Payment and Finance domains.

Java Tree Example

In this article, we will discuss the Java Tree Data structure. 1. Introduction Tree is a hierarchical data structure that stores the information naturally in the form of a hierarchy style. It is one of the most powerful and advanced data structures which is a non-linear compared to arrays, linked lists, stack, and queue. It represents the nodes connected by ...

Read More »

Insertion Sort Java Example

In this article, we will learn about the sorting algorithm, specifically the Insertion sort Java algorithm. We will look at what Insertion sort is and how does it work. We will discuss when this performs the best and when it performs the worst and will also look into the time and space complexity of it. 1. Introduction Sorting refers to ...

Read More »

How to use WireMock for Mocking

In this article we will learn about WireMock for mocking. WireMock is a simulator for HTTP-based APIs. Some might consider it a service virtualization tool or a mock server. It enables you to stay productive when an API you depend on doesn’t exist or isn’t complete. It supports testing of edge cases and failure modes that the real API won’t reliably produce. ...

Read More »

Java 8 Convert a primitive Array to List Example

In this article we will learn how to Convert a primitive Array to List using Java 8. For this example we will use IDEA IntelliJ but you can also use any IDE. 1. Introduction An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the ...

Read More »

Java 8 Display all ZoneId and its UTC offset Example

In this article we will see how to display all ZoneId and its UTC offset. A ZoneId is used to identify the rules used to convert between an Instant and a LocalDateTime. 1. Introduction The java.time package contains the main APIs for dates, times, instants and duration. The classes defined here represent the principle date-time concepts, including instants, durations, dates, times, ...

Read More »

Java 8 Convert Instant to ZonedDateTime Example

In this post, we feature a comprehensive Example on Java 8 Convert Instant to ZonedDateTime. We will discuss about the Java Instant and ZonedDateTime classes and how we can convert a time represented by the Instant to a ZonedDateTime object. 1. Java 8 Convert Instant to ZonedDateTime – Introduction First we will have a look at the Instant class. java.time.Instant ...

Read More »

Java 8 Convert Instant to LocalDateTime Example

In this post, we feature a comprehensive Example on Java 8 Convert Instant to LocalDateTime. First we will learn about Java Instance and LocalDateTime class and then how to convert an Instant object to LocalDateTime. 1. Introduction First we will have a look at the Instant class. java.time.Instant This class models a single instantaneous point on the time-line. This might ...

Read More »

Java 8 Period and Duration Example

In this article we will learn about the Duration and Period classes in Java. These classes were added in Java 8. 1. Introduction A Duration measures an amount of time using time-based values (seconds, nanoseconds). A Period uses date-based values (years, months, days). Duration public final class Duration extends Object implements TemporalAmount, Comparable<Duration>, Serializable   A Duration represents a time-based ...

Read More »

Java RunnableScheduledFuture Example

In this article we will learn about java.util.concurrent.RunnableScheduledFuture class which was introduced in Java 6. 1. Introduction Java RunnableScheduledFuture is a ScheduledFuture that is Runnable. Successful execution of the run method causes completion of the Future and allows access to its results. public interface RunnableScheduledFuture<V> extends RunnableFuture<V>, ScheduledFuture<V> To know how RunnableScheduledFuture works first we need to learn about java.util.concurrent.Future. 1.1 ...

Read More »

Java 9 Jshell Tutorial

1. Introduction In this article we will learn about Java 9 Jshell. The Java Shell tool (JShell) is an interactive tool for learning the Java programming language and prototyping Java code. JShell is a Read-Evaluate-Print Loop (REPL), which evaluates declarations, statements, and expressions as they are entered and immediately shows the results. The tool is run from the command line. Using ...

Read More »