Shouldn't “import foo.*” also include subpackage “foo.bar.*”?

后端 未结 3 2023
隐瞒了意图╮
隐瞒了意图╮ 2021-01-12 08:22

Studying Java, I\'ve thought about a, to me, rather confusing property of many tutorials. Consider the following two imports from a sample tutorial:

import j         


        
3条回答
  •  情歌与酒
    2021-01-12 08:48

    See my answer here (and my comment). A wildcard only goes 1 level deep, not into subpackages

提交回复
热议问题