Home » Archives for 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 BigInteger Class Example

In this article, we will discuss about the Java BigInteger Class – java.math.BigInteger. This interesting class extends the java.lang.Number class and implements the java.lang.Comparable interface. public class BigInteger extends Number implements Comparable 1. Java BigInteger Class – Introduction All operations behave as if BigIntegers were represented in two’s-complement notation (like Java’s primitive integer types). BigInteger provides analogues to all of ...

Read More »

Integer Java Class Example

In this article, we will learn about the Integer Java class. We will discuss some of the important methods, like the integer.parseint method (Java parseint method), the toString(), the intValue(), the toUnsignedString(), the toHexString(), the toOctalString(), the toBinaryString(), the valueOf(), and the decode(). 1. Introduction The Integer Java class wraps a value of the primitive type int in an object. ...

Read More »

ToString Java Example

In this article we will learn about the toString Java method in Object class. 1. Introduction The toString() method in the Object class returns a string representation of the object. In general, the toString() method returns a string that “textually represents” this object. The result should be a concise but informative representation that is easy for a person to read. ...

Read More »

Nested If Statements in Java

In this article we will look how to write nested if Statements in Java. 1. Introduction in Java Java is a popular programming language, created in 1995. It is owned by Oracle, and more than 3 billion devices run Java. It is used for mobile applications (especially Android apps), desktop applications, web servers, and application servers, games and much more. ...

Read More »

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 »