The reason I raise this question is that I am reading chap 7 and I see a constructor like this :
I don't know if the one I asked will work or not, if you can explain at which stage the compiler knows type X is there and we can declare it, it would be great, even better if you can tell me the usage of such constructor.
Thanks again.
The usage of such a constructor is to be used in mock exams to confuse people. That's basically it. In the real world you shouldn't use obscure features of the language, but make your code easy to read and maintain.
The constructor you showed is equivalent to this one:
All code in my posts, unless a source is explicitly mentioned, is my own.