Use the * notation to import all accessible constants from a class. : static import « Java Source And Data Type « SCJP






import java.awt.Color;
import static java.awt.Color.*;
public class MainClass{
   Color myColor = GREEN;
}








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