E and PI are not functions, they're static fields (data members). That code will output their values correctly. You don't have to import anything, the Math class is in the java.lang package, which is imported by default. (It's the only package imported by default, I believe.)
E and PI are not functions, they're static fields (data members). That code will output their values correctly. You don't have to import anything, the Math class is in the java.lang package, which is imported by default. (It's the only package imported by default, I believe.)
You don't have to import anything here. The java.lang.Math class should already be available as java.lang package is imported by default
I had this line of code:
int generator = 1 + (int) (Math.random() * 19);
http://puu.sh/sGVps/b318650d6b.png
The program I create works perfectly but i was wondering why I didn't need to import lang.math despite using random.