The Exponential Moving Average (or EMA for short) is one of the most commonly used indicators by stock and commodities markets traders. In this guide, we will discuss how to calculate the exponential moving average in a step by step algorithm. Why is the Exponential Moving Average called “Exponential” The Exponential Moving Average (EMA) is […]
Type casting primitive data types in Java
This tutorial focuses on the different type-casting operations that could be performed in Java (such as double to int and vise verca), using primitive data-types, and the consequences from performing such operations. What is Type Casting? In programming, type casting is the process of “casting” a value of a certain data type, into a storage […]
Bitwise AND “&” operator on Integers in Java
In this tutorial, we will discuss how to use the bitwise AND operator “&” on integers, and the side effects that this would have such as on signed and unsigned numbers. Before we start, I recommend that you check out our article about the best books and learning material that you could use to jump-start […]
Most popular 1TB SATA SSDs currently on the market (2019)
In recent years, the prices of solid state disks (SSDs) have decreased, making them more accessible to consumers. But with the decrease in price came also an increase in the number of options that are available to choose. The aim of this post is to provide an overview of the popular SATA interface SSDs that […]
How to calculate the Relative Strength Index (RSI)
We would like to do something different in this post. Usually, we focus more on programming and Java. However, in this post, we will have some fun by discussing how to calculate the Relative Strength Index (RSI) in a step by step guide. And because this is Nullbeans.com, we will also provide you with an […]
Java XOR (Exclusive or) operator on Booleans
In this tutorial, will show how to use a the Java XOR (exclusive or) operator on booleans, and we will discuss how the operator behaves with various combinations of boolean values. In Java, booleans can hold only two values, true and false. The XOR operator in Java ‘ ^ ‘ can be used with booleans […]
Java BigDecimal, Dealing with high precision calculations
In this tutorial, we will discuss how to use the Java BigDecimal class to deal with calculations that require a high degree of precision, such as when dealing with currency conversion, taxes or even high accuracy mathematical calculations. Why do we need the BigDecimal class In Java a floating point or a fractional number can […]
ArithmeticException in Java – Causes & Treatment
In this tutorial, we will introduce a few examples that would highlight the causes of getting an ArithmeticException thrown within a Java program. We will discuss the common causes of the exception, and how these could be treated. What is an ArithmeticException? An arithmetic exception is an error that is thrown when an invalid arithmetic […]
Java ArrayIndexOutOfBoundsException – Causes & Fixes
In this tutorial, we will discuss what a Java ArrayIndexOutOfBoundsException is, what causes it and how to make sure that you avoid it. What is an ArrayIndexOutOfBoundsException An array-index out of bounds exception is a Java exception thrown due to the fact that the program is trying to access an element at a position that […]