Common class rectangle {
Private int width;
Private int height;
Common rectangle (int width, int height) (
This.width = width;
This.height = height;
}
Common void length () {
int length = 2 *(this . width+this . height);
System.out.println ("circumference:"+length);
}
Public vacant area () {
int area = this . width * this . height;
system . out . println(" area:"+area);
}
}
//Java file 2: javatest
Public class JavaTest {
Public static void main(String[] args) {
Rectangle r = new rectangle (20,10);
r . length();
r . area();
}
}
Put these two files together and run file 2 JavaTest for debugging.
Hefei, the capital of Anhui Province, is located in the east of Chinese mainland. Jiangnan province was built in AD 1667 due to the partition of