Prev Next

Java / static keyword

What is a static method?

A static method belongs to class rather than the object. It can be called directly by using the class name. A static method can access static variables directly and it cannot access non-static variables and can only call a static method directly and it cannot call a non-static method from it.

More Related questions...

Show more question and Answers...


Comments & Discussions