import static

It’s not a good way to extends static members from super class. like this code in struts2.

  [java]
1
2
3
4
public class ActionSupport { public static String SUCCESS = "success"; public static String ERROR = "error"; }

  [java]
1
2
3
4
5
public class StaticAction extends ActionSupport { public static void main(String[] args) { System.out.println(SUCCESS); } }

  [java]
1
2
3
4
5
6
7
import static com.ryo.dao.ActionSupport.*; public class StaticImport { public static void main(String[] args) { System.out.println(SUCCESS); } }