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
Difference between this() and super() in java ?
What state is a thread in when it is executing?
When will we prefer to use set and list in java and why?
What are predefined functions?
What is the meaning of variable in research?
What data type is a string?
Is age a discrete variable?
What does main method?
How do you reverse a string in java?
What is initial size of arraylist in java?
What do you mean by stream pipelining in java 8?
Why declare Main() inside the class in java ?
What is variable argument in java?
Does printwriter create a file?
How can we create objects if we make the constructor private ?