# Number

- 20 February
### Format Number with Commas in Java

In this post, we will see how to format number with commas in java. How To Add Commas to Number in Java There are multiple ways to format number with commas in java. Let’s go through them. 1. Using DecimalFormat DecimalFormat can be used by providing formatting Pattern to format number with commas in java. […]

- 05 May
### How to left pad Integer with zeroes in java

Learn about how to left pad Integer with zeroes in java

- 02 May
### 7 ways to print float to 2 decimal places in java

Learn about how to print float to 2 decimal places in java in 7 different ways.

- 22 January
### 7 ways to format double to 2 decimal places in java

Learn about how to format double to 2 decimal places in java

- 25 December
### Find automorphic number in java

Learn about how to find automorphic number in java using different methods

- 09 October
### Java program to find first and last digit of a number

In this article, we are going to find first and last digit of a number in Java. To find first and last digit of any number, we can have several ways like using modulo operator or pow() and log() methods of Math class etc. Let’s see some examples. Before moving to example, let’s first create […]

- 30 September
### Find Perfect Number in Java

In this article, we are going to find whether a number is perfect or not using Java. A number is called a perfect number if the sum of its divisors is equal to the number. The sum of divisors excludes the number. There may be several approaches to find the perfect number. For example: 28 […]

- 28 September
### Number guessing game in java

In this article, we will implement Number guessing game in java. The number guessing game is based on a concept where player guesses a number between a range. If player guesses the exact number then player wins else player looses the game. Since this game provides limited attempts, so, player must guess the number with […]