public class Pgm6
{
static int count=0;
int n=0;
Pgm6()
{
count++;
System.out.println("Static Variable="+count);
n++;
System.out.println("NoN-Static Variable="+n);
}
public static void main(String args[])
{
Pgm6 c1=new Pgm6();
Pgm6 c2=new Pgm6();
Pgm6 c3=new Pgm6();
}
}
0 Comments