Private methods in Inheritance

后端 未结 9 1757
隐瞒了意图╮
隐瞒了意图╮ 2020-11-29 04:19

Here\'s an interesting code snippet:

public class Superclass {

    public static void main (String[] args){
        Superclass obj = new Subclass();
                


        
9条回答
  •  北海茫月
    2020-11-29 04:46

    Private methods are only for the owner.

    Not even for the kids, relatives or friends of the owner.

提交回复
热议问题