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

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

Java Program to Calculate the Cube of a Number

cube program in java

In this tutorial we will learn writing java program to calculate the cube of a given number.  Our program will take a number and will return the cube of that number as output. What is Cube of Number? When a number is multiplied to itself three times, resultant number is known as cube of number. … Read more

Calculate power of given number in Java

power program in java

In this tutorial we will learn writing a program in java to calculate the power of a given number. To calculate the power, user will give the base number and the exponent number. Power is calculated by multiplying the base number exponent times. For Example: Suppose we have to calculate 5 to power 3. Here … Read more

Even and Odd number Program in Java

even odd program in java

In this tutorial we will learn writing the program in Java to check whether a given number is even number or not. Before start writing Lets know What is Even and Odd number? A number is even if it is completely divisible by 2 with 0 remainder. And the number that does not completely divisible … Read more

Factorial Program In Java using loop and recursion

java factorial program

In this tutorial we will learn writing program in java to find the factorial of a number using for loop, while loop, functions and recursions. Before start writing the program Lets first know What is Factorial of a number? Factorial of a whole number ‘n’  is the product of that number with every whole number … Read more