📄 myrectangle.java
字号:
class MyRectangle implements Area
{
double width;
double height;
MyRectangle(double width,double height)
{
this.width=width;
this.height=height;
}
public double calculateArea()
{
return width*height;
}
public static void main(String args[])
{
MyRectangle rect=new MyRectangle(50,60);
System.out.println("The Area of rectangle is:"+rect.calculateArea());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -