Do I need to create the math class before using it?

21st Oct 2015, 8:56 AM
Simon Ho
Simon Ho - avatar
4 Answers
I believe abs, ceil, floor, max, min, pow, sqrt all exist already in the Java library from what I understand anyway...also, not sure about Math.random() but I think that's in there too. So I'm confident the answer is no :P
21st Oct 2015, 3:44 PM
Franklin Mesa Jr.
no you do not need to create math class, it is already defined in java
16th Dec 2015, 4:43 PM
B Y Chaudhary
B Y Chaudhary - avatar
2nd Jan 2016, 8:42 PM
Oleksandr Patuk
Oleksandr Patuk - avatar
You can open any java class and see what methods are defined in it, in terminal or command prompt run command like 'javap java.lang.Object' for object class or 'java.lang.Math' for Math class, etc
17th Oct 2016, 2:07 PM
Nikhil Shrivastav
Nikhil Shrivastav - avatar