DEV Community

kanaga vimala
kanaga vimala

Posted on

Difference between static and non-static method in Java

Static Method

A static method is a method that belongs to a class, but it does not belong to an instance of that class and this method can be called without the instance or object of that class.

**
Non-Static Method.
Non-static methods can access any static method and static variable, without creating an instance of the object.

**

Top comments (0)