As for what you should put inside the method, consider the steps you must take to calculate the area. You will need to take in two variables, width and height, then multiply them together to get the area.

YOu should honestly look at the Java API
for 2 reasons. 1 it uses doubles and it's a rectangle which is what you're looking for.
http://docs.oracle.com/javase/6/docs/api/java/awt/Rectangle.html
Rectangle getBounds()
Gets the bounding Rectangle of this Rectangle.
To make your own class like this you could do a few things.
First is to set it up like you normally would.
class rect
{
double w,h;
rect()
{
//if you need constructor calls, most likely you would want this constructor below
}
rect(double length, double width)
{
this.w = width;
this.h = height;
//this will set the height and width of the new rectangle object you create
//to create a new rectangle object you would do rect r = new rect(); or rect r = new rect(10,10); this makes both height and width 10.
}
next you will want methods TO SET and GET known as getters and settings...
public setWidth(double w)
{
this.w = w;
}
public getWidth()
{
return w; //returning will return the global variable at the top which is our width.
}
same will be done with height.

so this is the new one and it compiles well but I only need the print statement to return the area of a rectangular of width x and length y.! @eSpeX @KonradZuse
public class Rectangular {
public static void main (String [] args) {
}
public double area (double x, double y) {
return (x*y);
}
public double perimeter (double x, double y) {
return (2*x + 2*y);
}
}

@math456 You do not have anything calling those methods, therefore you have nothing to catch the returned values. If you are going to make it without interaction from a user, why not just use System.out.println instead of a return statement?