Does an import wildcard import everything all the time?

后端 未结 3 1568
无人及你
无人及你 2021-01-14 12:57

I was working on a little Java program and was using arrays so I had done:

import java.util.Arrays;

Later I started expanding on what I had

3条回答
  •  一整个雨季
    2021-01-14 13:18

    The wildcard imports all classes and interfaces in that package.

    However, the wildcard import does not import other packages that start with the same name.

    For example, importing java.xml.* does not import the java.xml.bind package.

提交回复
热议问题