class A
{
int i,j,k;
H(int i)
{
i++;
}
H(int i,int j)
{
i++;
j++;
}
H(int i,int j,int k)
{
i++;
j++;
k++;
}
}
class Manager5
{
public static void main(
String args [])
{
H h1 = new H(1);
H h2 = new H(1,2);
H h3 = new H(1,2,3);
System.out.println(h1.i);
System.out.println(h2.i+ ":" + h2.j);
System.out.println(h3.i+ ":" + h3.j+ ":" +h3.k);
}
the output of following is 0
0:0
0:0:0
can anybody please explain why constructor inside is not incrementing ?
whatever be the reason please explain elaborately.