Java static imports

前端 未结 4 1313
借酒劲吻你
借酒劲吻你 2021-02-01 04:25

Just by experiment I discovered that Java non static methods overrides all same named methods in scope even at static context. Even without allowing parameter overloading. Like<

4条回答
  •  無奈伤痛
    2021-02-01 04:39

    I do not think it is a bug or something different from normal import. For example, in case of normal import, if you have a private class with the same name as imported one the imported one will not be reflected.

提交回复
热议问题