Found 2616 Articles for Java

JAVA Program to Calculate Length of Chord of the Circle

Mr. Satyabrata
Updated on 27-Dec-2022 11:59:13

232 Views

A circle is a round shape two-dimensional diagram which has no corners. Every circle has an origin point and every point on the circle maintains equal distance from the origin. The distance between the origin and a point in a circle is known as Radius of the circle. And similarly, if we draw a line from one edge to another edge of the circle and the origin is held in the middle of it, that line is known as diameter of the circle. Basically, the diameter is double of the length of the radius. Chord of the circle refers to ... Read More

JAVA Program to Convert Octal to Binary

Mr. Satyabrata
Updated on 27-Dec-2022 11:54:39

958 Views

Octal Number − Octal number is also one of the number systems available. The octal number is represented with 8 digits which is from 0 to 7(0, 1, 2, 3... 7). The Octal numbers are expressed as base-8 in the numeral system. Binary Number − There are four types of number systems available. Binary numbers are one of them. The Binary number is basically represented with two digits i.e. one (1) and zero (0). The binary numbers are expressed as base-2 in the numeral system. Here we have a set of data in which we already store the binary value ... Read More

JAVA Program to Convert Binary to Octal

Mr. Satyabrata
Updated on 27-Dec-2022 11:51:14

1K+ Views

Binary Number − There are four types of number systems available. Binary numbers are one of them. The Binary number is basically represented with two digits i.e. one (1) and zero (0). The binary numbers are expressed as base-2 in the numeral system. Octal Number − Octal number is also one of the number systems available. The octal number is represented with 8 digits which is from 0 to 7(0, 1, 2, 3... 7). The Octal numbers are expressed as base-8 in the numeral system. Here we are converting the Binary number to octal number but for this we have ... Read More

JAVA program to Convert Hexadecimal to Binary

Mr. Satyabrata
Updated on 27-Dec-2022 11:31:40

2K+ Views

Binary Number − There are four types of number systems available. Binary number is one of them. The Binary number is basically represented with two digits i.e. one (1) and zero (0). The binary numbers are expressed as base-2 in the numeral system. Hexadecimal Number − Hexadecimal number is also one of the number systems available. The Hexadecimal number is represented with 16 digits which is from 0 to 15(0, 1, 2, 3... 15). From 10 to 15 it is represented as A to F. The Hexadecimal numbers are expressed as base-16 in the numeral system. Here we convert the ... Read More

How To Check Whether a Number is Tech Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:27:19

6K+ Views

A number is said to be a tech number, when an even digit number is divided into exactly two parts and the square value of the sum of those two numbers is equal to the original number. For more clarification, we take a number which has even digits. After that, divide it into two parts and add two parts. After getting the sum value, we calculate the square of it. Now we compare both the calculated square value and the original/input number. If both are same then we can say that the input number is a tech number otherwise ... Read More

How To Check Whether a Number is Tcefrep Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:24:06

361 Views

A number is said to be a Tcefrep number, if the reverse of that number is equal to the sum of the proper divisors of the original number. For more clarification, we find the sum of the divisors of a number and find the reverse of the original number. If both the sum value and the reverse of the given number are the same then we can say that the given number is a Tcefrep number. Some examples of Tcefrep numbers are: 6, 498906, 20671542 ... etc. In this article, we will see how to check if a ... Read More

How To Check Whether a Number is Strontio Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:19:14

2K+ Views

A number is said to be a Strontio number, if we multiply 2 with a four-digit number then in the resultant number the tens place and hundreds place digits are the same. In simple terms, Strontio numbers are basically four-digit numbers. When we multiply 2 with it, it results in a number whose tens place and hundred places are exactly the same. Some examples of Strontio numbers are- 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 1001 ... etc. In this article, we will see how to check if a number is a strontio number by using Java ... Read More

How To Check Whether a Number is Pointer Prime Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:17:02

580 Views

A number is said to be a pointer prime number, if the sum of the product value of digits and the original prime number results in the next prime number. For more clarification, we take a prime number and multiply the digits with each other and add that multiplication value with the original number. After that if we get another prime number which is next to the original prime number. Then we can say that the number is a pointer prime number. Some examples of pointer prime numbers are: 23, 61, 1123, 1231 ... etc. In this article, ... Read More

How To Check Whether a Number is a Narcissistic Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:12:36

2K+ Views

A number is said to be a narcissistic number, if the addition value of each digit raised to the power of numbers of digits available in the original number is equal to the original number. For more clarification, if the original number has ‘n’ number of digits, first we have to calculate the nth power of each digit. Then add those value and check if that calculated value and original number both are same then the original number is called as narcissistic number. Some examples of narcissistic numbers are: 153, 8208, 4210818, ... etc. In this article, we will ... Read More

How To Check Whether a Number is a Mersenne Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:08:10

1K+ Views

A prime number is said to be a Mersenne number, if the number satisfy the expression of M(n)= 2n-1, where ‘n’ is an integer. Let, ‘n’ is an integer. If 2n -1 is equal to the prime number, then that number is known as mersenne number Some examples of Mersenne numbers are: 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095 ... etc In this article, we will see how to check if a number is a Mersenne number by using Java programming language. To show you some instances Instance-1 Input number is 15. Let’s check ... Read More

Advertisements