编译时出现错误: 需要';',但是我代码里有;并且中英文也没搞错啊?

public class Rectangle{
private int length;
private int width;

public void Rectangle(int length,int width)
{
this.length=length;
this.width=width;
}
public int getPerimeter()
{
return (length+width)*2;
}
public int getArea()
{
   if(length<=50 && length>=10)
     if(width<=50 && width>=10)
       return length*width;
}
public void drawRect()
{  
 int i,j;
for(i=0;i<width;i++)
   {
  if(i=0 || i=width-1)
        {
          for(j=0;j<length;j++)
            System.out.print("*");
        }
else {
       for(j=0;j<length;j++)
          {
            if(j=0 || j=length-1)
                 System.out.print("*");
            esle
                 System.out.print(" ");
          }
        }
     System.out.println();
   }
}

public static void main()
{
   Rectangle R1=new Rectangle(20,30);
  Rectangle R2=new Rectangle(30,40);
  System.out.println("周长:"+R1.getPerimeter());
  System.out.println("面积"+R1.getArea());
  System.out.println("周长:"+R2.getPerimeter());
  System.out.println("面积"+R2.getArea());
R1.drawRect();
}
}

 


public class Rectangle{
    private int length;
    private int width;

    public Rectangle(int length,int width)
    {
        this.length=length;
        this.width=width;
    }
    public int getPerimeter()
    {
        return (length+width)*2;
    }
    public int getArea()
    {
        if(length<=50 && length>=10)
            if(width<=50 && width>=10)
                return length*width;
        System.out.println("超过区域");
        return 0;
    }
    public void drawRect()
    {
        int i,j;
        for(i=0;i<width;i++)
        {
            if(i==0 || i==width-1)
            {
                for(j=0;j<length;j++)
                    System.out.print("*");
            }
            else {
                for(j=0;j<length;j++)
                {
                    if(j==0 || j==length-1)
                        System.out.print("*");
                    else
                        System.out.print(" ");
                }
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {

        Rectangle R1=new Rectangle(20,30);
        Rectangle R2=new Rectangle(30,40);
        System.out.println("周长:"+R1.getPerimeter());
        System.out.println("面积"+R1.getArea());
        System.out.println("周长:"+R2.getPerimeter());
        System.out.println("面积"+R2.getArea());
        R1.drawRect();
    }
}

 

你的代码到处报错.... 哈哈,在网上复制粘贴的?

谢谢!确实我的代码里有很多错误