The first thing I notice is that your class is called Rectangle, with a capital 'R'. I'm not 100% sure, maybe you can overwrite it, but Rectangle is reserved by Java, and by the standard you name classes with the first word beginning in lower case and subsequent words with capitals, so that your two classes would be rectangle.java and rectangleTester.java. But in this I may be wrong.
Now with that out of the way some of the other mistakes are easy to fix. One is that you're enclosing each different object of Rectangle (rectangle 1,2,3) in curly braces ( { } ). That first closing curly brace after your initialization and work with rectangle1 is actually closing your main() class, so that rectangle 1 and 2 are in free space. Remove the curly braces after rectangle1, around 2, and before 3 so that you have your opening brace before rectangle1 and your closing after rectangle3.
Next is the three methods that each object of Rectangle (rectangle 1,2,3) calls:
CODE
int x = rectangle1.getLength();
int y = rectangle1.getWidth();
int area = rectangle1.getArea();
int perimeter = rectangle1.getPerimeter();
Each method here is called
getLength() or
getWidth(), but in your actual Rectangle class, there is no method to return length or width, and the return methods for area and perimeter don't have the same name:
CODE
public int Area();
{
Area=(length * width);
return Area;
}
public int Perimeter();
{
Perimeter = 2*(length) + 2*(width);
return Perimeter;
}
Change those methods to "public int getArea()" and "public int getPerimeter()" and add in a "public int getLength()" and "public int getWidth()" and you'll be a good deal closer to finishing the program.
Good luck!
-Mav