Write a program to calculate area of rectangle. Define a parametrized function "rect" to find area of rectangle

20/03/2013 00:45

 

public class rectangle
{
 void rect(int a,int b)
 {
 int area=a*b;
 System.out.println(area);
}
public static void main(String args[])
{
rectangle ob1=new rectangle();
ob1.rect(5,10);
}
}