{

# Learn free java-examples tutorials

BigInteger divide method in Java with examples| BigDecimal divide tutorials

January 11, 2023 ·  2 min read

This post shows how to divide BigInteger with others in java with examples. You can also check my previous posts on the BigInteger class in java. BigInteger Class tutorials Convert BigInteger to/from BigDecimal Convert BigDecimal to/from String BigInteger Multiplication example Convert BigDecimal to float Convert BigDecimal to double Top 10 BigInteger Examples(/2018/09/best-10-javamathbiginteger-class.html) Rounding BigDecimal to 2 decimal places Check BigDecimal contains Zero or not Convert BigInteger to/from ByteArray In java, long or integers can be multiplied using the division operator /....

BigInteger multiply method in Java with examples

January 11, 2023 ·  2 min read

This post shows how to multiply BigIntegers in java with examples. use multiplication(*) operator for multiply biginteger in java. You can also check my previous posts on the BigInteger class in java. BigInteger Class tutorials Convert BigInteger to/from BigDecimal Convert BigDecimal to/from String BigInteger Divide example Convert BigDecimal to float Convert BigDecimal to double Top 10 BigInteger Examples(/2018/09/best-10-javamathbiginteger-class.html) Rounding bigdecimal to 2 decimal places Check BigDecimal contains Zero or not Convert BigInteger to/from ByteArray In java, long or integers can be multiplied using the multiplication operator *....

How to Check whether Bigdecimal value is zero or not in Java

January 11, 2023 ·  2 min read

Sometimes, We want to do check bigdecimal value is zero or not BigDecimal is zero means that it can store 0, 0.0 or 0.00 etc values. So you want to check Integer is zero and the precision is also zero. BigDecimal object has enum constant BigDecimal.ZERO to represent 0 value with zero scales. use BigDecimal.ZERO to check object is zero or not. How do you check whether BigDecimal is zero or not in java There are multiple ways to check whether BigDecimal is zero or not in java....

How to Convert BigDecimal to Double or Double to BigDecimal in java with examples

January 11, 2023 ·  2 min read

BigDecimal is a big integer with arbitrary-precision signed decimal numbers. It contains a 32-bit integer and an unscaled decimal value. It is defined in java. math class. It is used in product prices and scientific calculations Double is used to store floating-point numbers and uses 64 bytes. This tutorial shows you how to convert BigDecimal to double in java. Note: If you are using currency values BigDecimal and converting to double, You lose precision and It gives wrong results in currency processing....

How to Convert BigDecimal to Float or Float to BigDecimal in java with examples

January 11, 2023 ·  3 min read

BigDecimal is a big integer with arbitrary-precision signed decimal numbers. It contains a 32-bit integer and an unscaled decimal value. It is defined in java. math class. It is used in product prices and scientific calculations Float is used to store 32-bit floating-point numbers. This tutorial shows you how to convert BigDecimal to Float in java. Note: If you are using currency values BigDecimal and converting to Float, You lose precision and It gives wrong results in currency processing....

How to get yesterday and tomorrow date in java with example

January 11, 2023 ·  3 min read

This tutorial is about multiple ways to find yesterday’s date and tomorrow’s date in java. FInd yesterday Date using LocalDate minusDays(1) method and Calendar instance Get Tomorrow’s Date using LocalDate plusDays(1)method and Calendar instance How to get Yesterday’s Date in java There are multiple ways we can retrieve the last 1-day date or previous day date in java. Java8 LocalDate Java8 introduced Date classes to java.time package. You can check previous post on LocalDate examples...

How to Rounding Bigdecimal values with 2 Decimal Places in Java

January 11, 2023 ·  2 min read

This tutorial shows you how to round bigdecimal value with n decimal places in java BigDecimal has the methods setScale and round to round the desired value. You can also check my previous posts on the BigInteger class in java. BigInteger Class tutorials Convert BigInteger to/from BigDecimal Convert BigDecimal to/from String BigInteger Divide example BigInteger Multiplication example Convert BigDecimal to float Convert BigDecimal to double Top 10 BigInteger Examples(/2018/09/best-10-javamathbiginteger-class.html) Check BigDecimal contains Zero or not Convert BigInteger to/from ByteArray BigDecimal setScale method This method is used to return a BigDecimal object with a given scale and rounding mode....

Multiple ways to fix java.util.NoSuchElementException: No value present error in java

January 11, 2023 ·  3 min read

In this tutorial, Learn how to fix java.util.NoSuchElementException: No value present error in java application. This error java.util.NoSuchElementException: No value present thrown when there is no element found in Optional object with Stream API in java8. Let’s create an array and initialize it with string values. You can check how to create and initialize an array in a single line Let’s see a simple example to check if a string exists in an array....

Sendgrid dynamic email template tutorials with examples

January 11, 2023 ·  4 min read

In this tutorial, We will discuss SendGrid dynamic template examples for replacing date, currency, and iterate objects. This tutorial covers the following things How to create a dynamic template in the SendGrid dashboard? How to replace dynamic data (HTML) into SendGrid Templates in JavaScript Adding an array of json data to templates Iteration loop in SendGrid template conditional check in template format date in SendGrid email template How do create an email template in SendGrid?...

Subscribe
You'll get a notification every time a post gets published here.