Java Program to calculate Power using POW() method

Calculate Power Using Pow() Method using java

In this tutorial we will learn writing Java Program to calculate Power of integer using POW() method. POW() method in Java  java.lang.Math.pow() In java, pow() method takes two parameter as an input and return the calculated Power as an Output. For Example: Math.pow(x, y) where x is base and y is exponent. so for the input … Read more

Calculate Power Without using POW method in Java

Calculate Power Without Using Pow() Method in Java

In this tutorial, we are going to learn java program to calculate the power of a given number. To calculate the power, user will give the base number and the exponent number. We will calculate Power by multiplying the base number exponent times. For example Power can be calculated using in built pow() method and … Read more

Java program to Print Prime Number in Given Range

Print Prime Number In Given Range in java

In this tutorial, we will learn writing Java program to print all the prime numbers that are present in the given range. Problem Statement What is Prime Number? Prime Numbers are the numbers that have only 2 factors 1 and the number itself. It is only defined for the number which is greater than ‘1’. … Read more

Factorial Program in Java using While loop iterative method

java factorial program while loop

In this tutorial we will learn writing Java program to calculate Factorial of given number using while loop. Here basically we will be using iterative approach which is different from recursive approach. Please check this Program Factorial Program in java using recursive method. Factorial Program in Java using for loop iterative method. Factorial Program in … Read more

Factorial program in Java using recursion

Factorial Program Using Loop And Recursion in java

In this tutorial we are going to learn writing java program to calculate the Factorial of a given number using recursion. You can also check : Factorial program in java using Iterative method. What is Recursion? Recursion is a method that defines something in terms of itself, which means it is a process in which … Read more