Static importing gives you access to static methods : static import « 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 import 
1.5.3.Static importing gives you access to static methods
import java.awt.Color;
import static java.awt.Color.GREEN;
import static java.awt.Color.getColor;
public class MainClass{
   Color myColor = GREEN;
  public static void main(String[] a){
    getColor(null);
    
  }
}
1.5.static import
1.5.1.Java's static import facility allows you to import static data and methods.
1.5.2.Use the * notation to import all accessible constants from a class.
1.5.3.Static importing gives you access to static methods
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.