package exx4;
class Bx{
int width,height;
int muti()
{
return width*height;
}
void getvalue( int w, int h)
{
width = w;
height =h;
}
}
public class Exx4 {
public static void main(String[] args) {
Bx ob1 = new Bx();
Bx ob2 = new Bx();
double value;
ob1.getvalue(10,5);
ob2.getvalue(20,4);
value =ob1.muti();
System.out.println("Result is secound " +value);
value =ob2.muti();
System.out.println("Result is secound " +value);
}
}
class Bx{
int width,height;
int muti()
{
return width*height;
}
void getvalue( int w, int h)
{
width = w;
height =h;
}
}
public class Exx4 {
public static void main(String[] args) {
Bx ob1 = new Bx();
Bx ob2 = new Bx();
double value;
ob1.getvalue(10,5);
ob2.getvalue(20,4);
value =ob1.muti();
System.out.println("Result is secound " +value);
value =ob2.muti();
System.out.println("Result is secound " +value);
}
}
No comments:
Post a Comment