编辑代码

package c1;

     	public class r1 {
	int length;
	int width;
	
  r1(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){
		r1 a =new r1(25,37);
		a.getper();
		a.getArea(); 
	}
	}