import java.util.Scanner;
class A
{
static int count;
static int i=0;
A()
{
count++;
i=i+1;
System.out.println("c"+i+" count="+count);
}
}
class staticCounter
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
A.count=sc.nextInt();
A a1=new A();
A a2=new A();
A a3=new A();
A a4=new A();
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: