How do you use, call, and access a static method in Java?

Answer Posted / glibwaresoftsolutions

• The static keyword needs to appear before the method name.
• Use the class (className.methodName) to invoke a static method.
• No non-static instance variables or methods can be accessed by static methods.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When the constructor of a class is invoked?

788


What are jee technologies?

785


What are locale settings?

756


Why java is called not pure object oriented language?

824


What is the purpose of sizeof operator?

771


what is the difference between thread and runnable types? : Java thread

786


What is the loop in java?

819


how to prepare for IT Officers Interview in Banks

1722


Can arraylist contain null values?

765


What are the steps that are followed when two computers connect through tcp?

776


How do you compare two strings lexicographically?

741


Differentiate between vector and array list.

859


What data type is true or false?

803


Explain the difference between transient and volatile in java?

791


who can i handle multiple client in RMI

1680