Why are the methods of the Math class static

So they can be invoked as if they are a mathematical code library.

Showing Answers 1 - 1 of 1 Answers

MANISHA PATHAK

  • Oct 26th, 2006
 

Static Methods can be directly called.There is no need to create the object of the class.

ex    class A

       {

             staic void display()

             {     System.out.println("Hello");  }

              public static void main(String args[])

              {        display();     }

         }

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions