Java Program to Find GCD of Two Numbers

In this tutorial, we will write a java program to calculate the GCD of two numbers. GCD of two numbers in Java: GCD(Greatest Common Divisor) or we can say HCF(Highest Common Factor) of two numbers is the largest number(integer) that divides both the number. Or in other words, two numbers that are divisible by the … Read more

Java Program to Check Armstrong Number

In this tutorial, we will write a Java Program to check Armstrong number. We will write two different programs to check the armstrong number in java. 1. What is an Armstrong number?2. Java program to check the Armstrong Number(for any digit number) using a while and for.3. Java program to check the Armstrong Number(using Math.pow() … Read more

Java Program to Generate Fibonacci Series

In this java program tutorial, we will write a java program to display the Fibonacci series. Let us first understand what is Fibonacci series is and then the Java program to generate them. What is Fibonacci Series? Fibonacci series is the series of numbers where the next number is achieved by the addition of the … Read more

Java Program to Reverse the Number

The following Java Program uses the Multiplication and Modulus Operator to reverse the number entered by the User. Something like this, If the entered Number is 1234567, then the final result will display 7654321. If you do not know about the Operator in Java, click the link below. Java Operator Example: Java Program to Reverse … Read more

Java Exercise: How to Divide in Java

Division in Java: This article will show you the process to divide in Java with output. The division is one of the basic operations in java. Others include addition, subtraction, and multiplication. For dividing in java, a division operator (/)is used. This operator takes two operands(the natural numbers to be divided) to divide them. We … Read more