class
Rectangle
{
int length;
int breadth;
private static int count;
static void displaycount()
{
System.out.println("No of
Object : " + count);
}
Rectangle(int a,int b)
{
length = a;
breadth = b;
count++;
}
Rectangle()
{
length = 0;
breadth = 0;
count++;
}
void display()
{
System.out.println("Length
: " + length);
System.out.println("Breadth :
" + breadth);
}
public static void main(String args[])
{
Rectangle.displaycount();
Rectangle r1 = new
Rectangle(10,20);
Rectangle.displaycount();
Rectangle r2 = new Rectangle();
Rectangle.displaycount();
r1.display();
r2.display();
}
}
ReplyDeletemobile phone repair in Lafayette
iphone repair in Lafayette
cell phone repair in Lafayette
phone repair in Lafayette
tablet repair in Lafayette
ipad repair in Lafayette
mobile phone repair Lafayette
iphone repair Lafayette
cell phone repair Lafayette
phone repair Lafayette