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
What is a parameter used for?
Can we execute a program without main() method?
What is the formula to calculate percentage?
Can we have try block without catch block?
What is better- service oriented or batch oriented solutions?
What is empty list in java?
Do extraneous variables affect validity?
Java.util.regex consists of which classes?
What are the methods used to implement for the key object in the hash map?
Can we change the value of static variable?
What is float in java?
Can we sort a map in java?
What are extraneous variables examples?
Is zero a positive integer?
what is function overloading in java?