📄 app10_2.java
字号:
// app10_2, 用抽象类类型的变量来建立对象
public class app10_2
{
public static void main(String args[])
{
CShape shape1=new CRectangle(5,10);
shape1.setColor("Yellow");
shape1.show();
CShape shape2=new CCircle(2.0);
shape2.setColor("Green");
shape2.show();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -