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

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Java Source And Data Type » static Method 
1.24.1.Static methods is more appropriate to be invoked using the class name rather than a variable name.
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.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.