标签:nbsp test abstract on() rac person off int() end
interface Switch{
public void on();
public void off();
}
abstract class Printer{
public abstract void print();
}
class ColorPrinter extends Printer implements Switch{
public void on(){
//......
}
public void off(){
//......
}
public void print(){
//......
}
}
public class Test(){
public static void main(String[] args){
Person Person=new Chinese();
Printer print=new ColorPrinter();
person.userPrinter(print);
.......
}
}
标签:nbsp test abstract on() rac person off int() end
原文地址:https://www.cnblogs.com/l2760186162/p/10731756.html