bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Math pow() Method

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind Java Math pow() Method?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___.out.println(Math.pow(2, 8));
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The pow() method raises a number to the power of another number.
Definition and Usage
Java Math pow() Method

❮ Math Methods

Example

System.out.println(Math.pow(2, 8));
System.out.println(Math.pow(3, 4));
System.out.println(Math.pow(9, 0.5));
System.out.println(Math.pow(8, -1));
System.out.println(Math.pow(10, -2));

Definition and Usage

The pow() method raises a number to the power of another number.

Syntax

public static double pow(double
base , double
exponent )

Parameter Values

ParameterDescription
baseRequired. The base of the operation.
exponentRequired. The exponent of the operation.

Technical Details

Returns:A double value representing the result of the base to the power of the exponent.
Java version:Any

Previous

Java Math nextUp() Method

Next

Java Math random() Method