框架层代码:
package org.vhow.framework;
abstract class BaseClass
{
public void callOnDoSth()
{
onDoSth();
}
abstract void onDoSth();
// protected void onDoSth();
}
package org.vhow.framework;
public class FrameworkMain
{
public static void main(String[] args)
{
BaseClass base = new ClientClass();
base.callOnDoSth();
}
}应用层代码:
package org.vhow.framework;
class ClientClass extends BaseClass
{
@Override
void onDoSth()
{
System.out.println("ClientClass : onDoSth()");
}
}
642

被折叠的 条评论
为什么被折叠?



