Being Java programmer.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Being Java programmer.
Being Java programmer.
I really have no notion about it but I read somewhere we can create an object without invoking constructor.object is created using constructors only
Being Java programmer.
Constructor is being automatically created by java compiler if user not defining one - always.Ganish Patil wrote:
I really have no notion about it but I read somewhere we can create an object without invoking constructor.object is created using constructors only
Being Java programmer.
Ganish Patil wrote:@ Vilda but there are some exceptional cases where objects are created without invoking constructor neither implicitly nor explicitly. I think that is Deserialization and clone something like that, I haven't read about it yet so I'm not sure, but will peruse soon.
Being Java programmer.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Paweł Baczyński wrote:Here you have some code where I do not call any constructor at all
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|