编辑代码

/*04 张浩宇*/
public class Rectangle {
	int length;
	int width;
	
	Rectangle(int width,int length){
		this.width =width;
		this.length = length;
	}
	
	void getper(){
		System.out.println("周长:"+(width+length)*2);
	}
	void getArea(){
		System.out.println("面积: "+width*length);
	}
	public static void main(String[] args){
		Rectangle a =new Rectangle(16,23);
		a.getper();
		a.getArea();
	}
	}