+ 1
Java question
Can i do this in java? double pi = Math.PI();
3 Answers
+ 8
Eric
No you can do Math.PI not Math.PI()
PI is not a method it's a value.
In Math class it is declared as
public static final double PI = 3.14159...;
+ 3
Maybe it would be like this:
https://code.sololearn.com/cA0A0a7A04A1
0
PI is a variable, not a method.