Could you help me please. I have one idea but don\'t know how can I implement it.
So the question is: Can we interrupt creating an object in constructor i.e.
That would be possible. Another way would be to put your checking in before you create the object. Like so
SomeClass someClass = null; if (someCriteria == VALID) { someClass = new SomeClass(someCriteria); }
Hope this helps.