How to force derived class to call super method? (Like Android does)

前端 未结 8 2259
余生分开走
余生分开走 2020-12-08 04:00

I was wondering, when creating new Activity classes and then overriding the onCreate() method, in eclipse I always get auto added: super.onCr

8条回答
  •  时光说笑
    2020-12-08 04:04

    Eclipse is just being helpful, reminding you that you can call the superclass implementation if you want.

    you are probably getting an error because you are not doing something necessary that the superclass does, since you are not calling its implementation.

提交回复
热议问题