Java Programming Tips

How to Find Sum of Digits of a Number in Java

The following Java program computes the sum of digits of a number. For example, if the input is 278, the output is calculated as 2+7+8 = 17. This function is useful in a number of numeric algorithms. For example,  IMEI check sum algorithm requires calculation of sum of digits. This problem is also given as […]

Fascinating Number in Java

What is a Fascinating Number? Fascinating numbers are 3 digit numbers with a unique property. When a 3 digit number is concatenated with the number multiplied by 2 and the number multiplied by 3, sometimes we get a number which contains all the digits from 1 to 9 exactly once. There could be any number […]

Keith Number Program in Java

Keith numbers are rare numbers with a Fibonacci like property. An n-digit number with value N is a Keith number if N is part of the Keith series generated. This series starts with the n digits of the number N. Then the subsequent numbers in the series are found by calculating the sum of preceding […]

Checking IMEI Number Using Java Programs

IMEI number (International Mobile Equipment Identity) is a unique number used to identify mobile phones. IMEI is used by mobile networks to uniquely identify a device and hence the IMEI number is used to block stolen devices. IMEI number is composed of 15 decimal digits including a check digit. The last digit in the IMEI […]

How to Calculate CRC32 Checksum in Java

Cyclic Redundancy Check (CRC) is an error detection technique commonly used to detect any changes to raw data. CRC checksum is a short fixed length data derived from a larger block of data. If there is a change in original raw data, the computed CRC checksum will differ from the CRC checksum received from the […]