Java “self” (static) reference

前端 未结 4 1218
感动是毒
感动是毒 2021-02-20 14:04

I am looking for a \"self\" reference to the current class in JAVA in a static context manner like in PHP Scope Resolution Operator?

Solution: Break out of scope? BEWARE

4条回答
  •  攒了一身酷
    2021-02-20 14:17

    You should not inherit logger. Just declare logger in each class.

    But if you don't want do such useful think, just don't make it static)

提交回复
热议问题