static method in Java

In Java, a static method is a method that belongs to a class rather than an instance of a class. The method is accessible to every instance of a class, but methods defined in an instance are only able to be accessed by that member of a class.
* Static method can be inherited in a class, but can not be inherited in an interface.
```
class C {
    static void printName() {
        System.out.println("C");
    }
}

class Main {
    public static void main(String[] args) {
        new C().printName();
    }
}
```
Static vs. instance calls
Type | Calling | Legal? | How?
------ | ------ | ------ | ------
Static method | Another static method or variable | Yes | Using the classname
Static method | An instance method or variable | No | 
Instance method | A static method or variable | Yes | Using the classname or a reference variable
Instance method | Another instance method or variable | Yes | Using a reference variable