class Rectangle
{
int length, width;
Rectangle(int x, int y)
{
length = x;
width = y;
}
int rectArea()
{
return (length * width);
}
}
class RectangleArea
{
public static void main(String args[])
{
Rectangle rect1 = new Rectangle(15,10);
int area1 = rect1.rectArea();
System.out.println("Rectangle = " + area1);
}
}
Area and Perimeter of Rectangle,Java Rectangle Example,Calculating,program to find area and rectangle,
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment