Where did you fix the formatting and add the {}s?
Type: Posts; User: Norm
Where did you fix the formatting and add the {}s?
One problem is the poor formatting makes it hard to read the code.
Another problem is the lack of {}s following the if statement.
What you have posted won't compile so I can't test that to see...
Replace the one line of the constructor with the 4 lines that I posted. The second line of what I posted is the original constructor. There is one new line before it and 2 new lines after it.
...
There are. Here's how to find it:
Change the lines around the constructor to include these extra lines:
static int cnt = 0; //<<<<<<<<<<<<< for debugging
public...
Sounds like a recursive loop. Make sure the code does not have recursive calls.