Avoid repeated imports in Java: Inherit imports?

前端 未结 3 894
轮回少年
轮回少年 2021-02-19 07:12

Is there a way to \"inherit\" imports?

Example:

Common enum:

public enum Constant{ ONE, TWO, THREE }

Base clas

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-19 07:39

    If you're using Eclipse, use "Organize Imports" (Ctrl+Shift+O) to let the IDE do the imports for you (or use code completion (Ctrl+Space)

提交回复
热议问题