Static methods is more appropriate to be invoked using the class name rather than a variable name. : static Method « Java Source And Data Type « SCJP






class StaticMethod {
  public static void main(String[] args) {
    StaticClass.display("sample output");
  }
}

class StaticClass {
  static void display(String s) {
    System.out.println("StaticClass: " + s);
  }
}








1.24.static Method
1.24.1.Static methods is more appropriate to be invoked using the class name rather than a variable name.