在java中,我们将body赋予子类中父类的抽象方法,然后通过子类对象调用该函数,如下所示:
//let the abstract function be fun then,
child c= new child();
c.fun();
然后fun执行child给出的主体,但是这和函数覆盖有什么不同呢?
我对programming.Just并不陌生,我想知道Abstraction的实际概念:
Representing meaningful details, without going much into background details。
例如,可以将Encapsulation解释为包装在class中的methods和variables。
Abstraction是否意味着使用正确的Access specifiers,以便信息可以本地化?或者根据需要使数据对特定的class/method可见?只是猜测而已。
一个小的演示示例可能会很有用。