How do you use, call, and access a static method in Java?
Answer Posted / nashiinformaticssolutions
• 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 the difference between serializable and externalizable interfaces?
When do we use synchronized methods in java?
What are classloaders?
What's the difference between an abstract class and interface in java?
What is entry set in java?
Explain inheritance in java?
What are functions in java?
Can you use this() and super() both in a constructor?
What is core java used for?
Can we have multiple classes in single file ?
What is a buffer in java?
Give some features of interface?
What is a method header?
What is Garbage Collection in Java
Name component subclasses that support painting in java programming?