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 are the 2 types of java programs?
Which java version is latest?
When to use runnable interface vs thread class in java?
What are benefits of java?
What are the different tags provided in jstl?
What is preflight request?
Why multiple inheritance is not supported by java?
What is the purpose of a parameter?
How can you set the applet size?
how to write a program for sending mails between client and server
What are autoboxing and unboxing? When does it occur?
can rmi and corba based applications interact ?
What do you mean by Hash Map and Hash Table?
Write a java program for binary search?
What is the difference between static and global variables and also define what are volatile variables?