Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (limj):

need help with math methods coding

OpenStudy (blazeryder):

In what Programming Language? Java?

OpenStudy (limj):

Yes Java

OpenStudy (blazeryder):

I might be able to help. Might! That is the key word =) Worth a try.....

OpenStudy (blazeryder):

What are you trying to do?

OpenStudy (limj):

this is the sample listed double pow(2.0, 3.0): use 2.0 and 3.0

OpenStudy (blazeryder):

To do this you program would look like: public class MathPow { // This would be your main method public static void main(String[] args) { // does the math operator double x = Math.pow(2.0, 3.0); // Prints the answer System.out.println("Math.pow (2.0 , 3.0) is " + x); } } There are also other ways you could do this. For example: public class MathPow { // This would be your main method public static void main(String[] args) { // Prints the answer System.out.println("Math.pow (2.0 , 3.0) is " + Math.pow(2.0, 3.0)); } } Most people would choose the second option as it is faster and requires less typing. =) If you have anymore questions just tag me. Also, welcome to OS (Open Study)! If you do not know how to tag, just put the @ sign and then type a username! @limj

OpenStudy (bonnieisflash1.0):

hi

OpenStudy (joshmorris):

hi

OpenStudy (limj):

thank you blaze

OpenStudy (limj):

@BlazeRyder

OpenStudy (blazeryder):

No problem! I am glad I could help. I know what it feels like to not understand anything in Java, so I figured I should help. =)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!