Can't declare an abstract method private

前端 未结 6 1614
再見小時候
再見小時候 2020-12-11 00:31

I want to do this, yet I can\'t. Here is my scenario and rational. I have an abstract class for test cases that has an abstract method called test(). The test() method is to

6条回答
  •  渐次进展
    2020-12-11 01:03

    I want to do this, yet I can't

    Changing this will require rewriting the compiler, which isn't likely.

    You realize why this can never work, right? A subclass can't override a private method, yet, it's abstract which says they must. Catch-22.

提交回复
热议问题