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 a checked and an unchecked exception?
What is meant by call by reference?
Is cout buffered?
What do you mean by multithreaded program?
What is the best definition for data?
What is the difference between keyword and identifier?
How to calculate the length of a singly linked list in java?
What is exception propagation?
java program with complete 4 oops concepts implemented example
What is static in java?
When do we need to use internal iteration? When do we need to use external iteration?
Tell me about your ability to work under pressure
What is anagram number?
How to use arraylist in java netbeans?
Why we use protected in java?