/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Rectangle R=new Rectangle(10,10);
System.out.println("面積為:"+R.Area());
}
}
class Rectangle{
public double width;
public double height;
Rectangle()
{
width=0;
height=0;
}
Rectangle(double w,double h)
{
width=w;
height=h;
}
public double Area()
{
return width*height;
}
}