instanceof java
Posts: 576
Nickname: instanceof
Registered: Jan, 2015
instanceof java is a java related one.
Find power using math.pow() in java
Posted: Apr 23, 2017 10:46 AM
This post originated from an RSS feed registered with Java Buzz
by instanceof java.
Original Post: Find power using math.pow() in java
Feed Title: Instance Of Java
Feed URL: http://feeds.feedburner.com/blogspot/TXghwE
Feed Description: Instance of Java. A place where you can learn java in simple way each and every topic covered with many points and sample programs.
Latest Java Buzz Posts
Latest Java Buzz Posts by instanceof java
Latest Posts From Instance Of Java
Advertisement
java.lang.Math.pow() method used to find the power of numbers. It is a static method define in Math class so that we can call directly using classname. Math.pow(); It takes two double arguments and return type is double. public final class Math extends Object public static double pow(double a, double b)
Java Program to explain the usage of Math.pow() method in java public class MathPow { /** * Math.pow() method in java * @author www.instanceofjava.com */ public static void main(String[] args) { double a = 3.0; double b = 4.0; System.out.println("Math.pow(" + a + "," + b + ")=" + Math.pow(a, b)); System.out.println("Math.pow(" + b + "," + a + ")=" + Math.pow(b, a)); System.out.println("Math.pow(4,2)="+Math.pow(4,2)); } } Output: Math.pow(3.0,4.0)=81.0 Math.pow(4.0,3.0)=64.0 Math.pow(4,2)=16.0
Read: Find power using math.pow() in java