Ishan Pandya wrote:
Well stephan i am still not clear with it.. i didnt called the no-argument constructor at all then why is it giving me error on that part.. when does that no argument constructor gets called??
The compiler doesn't know that the no-arg constructor is not called. It might be called from another class. Therefore the compiler has to ensure the code is valid.
If you don't need the no-arg constructor, why did you put it in ?