[Solved] Issue with Java Math Class | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

[Solved] Issue with Java Math Class

https://code.sololearn.com/c92EjmLJYq97/?ref=app This code works fine here. But when i run it in a java ide it shows "the method pow(int, int) is undefined for the type math' Please help

10th Jul 2020, 11:28 AM
SHIVANSH
SHIVANSH - avatar
5 Answers
+ 1
import static java.lang.Math.*;
10th Jul 2020, 11:41 AM
J.k.b.
J.k.b. - avatar
0
It is working. What is a problem?
10th Jul 2020, 11:34 AM
J.k.b.
J.k.b. - avatar
0
J.k.b. The problem is that it does not work in any other java ide
10th Jul 2020, 11:37 AM
SHIVANSH
SHIVANSH - avatar
0
Try importing Math class import java.lang.Math
10th Jul 2020, 11:38 AM
Shobhith J B
Shobhith J B - avatar
0
Its working now. I tried opening it in a new file and it worked
10th Jul 2020, 11:44 AM
SHIVANSH
SHIVANSH - avatar