How do you use, call, and access a static method in Java?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
what is instanceof operator used in java?
What is array in java?
What is the difference between throw and throws keywords?
What is the range of the short datatype?
What is unicode in java?
Do loops java?
What is map in java?
What are the types of inner classes (non-static nested class) used in java?
What is callablestatement? How you can call stored procedure to pass in parameter?
Is there any case when finally will not be executed?
What is the purpose of encapsulation?
how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)