What is an “import” called?
问题 It is not a statement nor an expression. What is that called then? A directive? 回答1: "declaration" See also JLS 7.5. Import Declaration 7.5.1 Single-Type-Import Declaration 7.5.2 Type-Import-on-Demand Declaration 7.5.3 Single Static Import Declaration 7.5.4 Static-Import-on-Demand Declaration 回答2: It's called a Declaration. 回答3: In the general scope, it is a directive. Within Java, classes have a tight relationship between their declaration and their containing file (known as a compiler unit