1) No constructor gets priority! You need to look at your "this" calls:
- In A(int), you call "this()"(with no arguments) before you do the println, so naturally the constructor with no arguments is run at that point.
- In B(), you call "this(int)" before the println, so again the
B(int) constructor is run at that point.
So the only priority operating is that which you've put in place by deciding which constructors call which others.
2) The definition of "recursive" is a method that calls itself. This is a potentially dangerous practice, since it can easily lead to infinite loops. For this reason,
Java disallows recursion in constructors - ie. constructors cannot call themselves.
This is what's happening with your two examples:
In A(), putting a call to "this()" (naturally, as the first staement), then since "this" *IS* "A" would result in A() calling A() - calling A() calling A() calling .....
Ditto for B(int), where "this(int)" becomes B(int) calling B(int) calling .....
Hope this helps